File tree 1 file changed +3
-29
lines changed
android/src/main/java/com/getcapacitor/community/audio
1 file changed +3
-29
lines changed Original file line number Diff line number Diff line change @@ -123,29 +123,12 @@ public void configure(PluginCall call) {
123
123
124
124
@ PluginMethod
125
125
public void preload (final PluginCall call ) {
126
- new Thread (
127
- new Runnable () {
128
- @ Override
129
- public void run () {
130
- preloadAsset (call );
131
- }
132
- }
133
- )
134
- .start ();
126
+ new Thread (() -> preloadAsset (call )).start ();
135
127
}
136
128
137
129
@ PluginMethod
138
130
public void play (final PluginCall call ) {
139
- getBridge ()
140
- .getActivity ()
141
- .runOnUiThread (
142
- new Runnable () {
143
- @ Override
144
- public void run () {
145
- playOrLoop ("play" , call );
146
- }
147
- }
148
- );
131
+ getBridge ().getActivity ().runOnUiThread (() -> playOrLoop ("play" , call ));
149
132
}
150
133
151
134
@ PluginMethod
@@ -200,16 +183,7 @@ public void getDuration(final PluginCall call) {
200
183
201
184
@ PluginMethod
202
185
public void loop (final PluginCall call ) {
203
- getBridge ()
204
- .getActivity ()
205
- .runOnUiThread (
206
- new Runnable () {
207
- @ Override
208
- public void run () {
209
- playOrLoop ("loop" , call );
210
- }
211
- }
212
- );
186
+ getBridge ().getActivity ().runOnUiThread (() -> playOrLoop ("loop" , call ));
213
187
}
214
188
215
189
@ PluginMethod
You can’t perform that action at this time.
0 commit comments