@capgo/native-audio 5.0.2 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,6 +91,7 @@ public class AudioDispatcher
91
91
 
92
92
  public void loop() throws Exception {
93
93
  mediaPlayer.setLooping(true);
94
+ mediaPlayer.start();
94
95
  }
95
96
 
96
97
  public void unload() throws Exception {
@@ -436,6 +436,7 @@ public class NativeAudio extends Plugin implements AudioManager.OnAudioFocusChan
436
436
  AudioAsset asset = audioAssetList.get(audioId);
437
437
  if (LOOP.equals(action) && asset != null) {
438
438
  asset.loop();
439
+ call.resolve();
439
440
  } else if (asset != null) {
440
441
  asset.play(
441
442
  time,
@@ -448,6 +449,8 @@ public class NativeAudio extends Plugin implements AudioManager.OnAudioFocusChan
448
449
  }
449
450
  }
450
451
  );
452
+ } else {
453
+ call.reject("Error with asset");
451
454
  }
452
455
  }
453
456
  } catch (Exception ex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/native-audio",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "A native plugin for native audio engine",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",