Update AudioDispatcher.java#34
Conversation
Actually play the file
|
Sorry about the poor documentation. first time ever submitting a pull request :) |
This will prevent from other processes to drop sound
|
@haimomesi Hi :) |
When we call loop function, the file does not play, as the documentation say. The dispatcher class only set the setLooping state to true, but never call the play function. Unless it’s intended to be use as The second commit was to solve a problem in iOS which our WKWebView’s getUserMedia would break the stream after an asset played with this plugin. That’s why when we play a file, we set the category as playback, and when we finish we set it as ambient |
|
Would be great to get this merged in. Fixes some important issues. |
|
|
||
| public void loop() throws Exception { | ||
| mediaPlayer.setLooping(true); | ||
| invokePlay(0.0, true); |
There was a problem hiding this comment.
Why do we need to play from scratch when we want to loop the current music
There was a problem hiding this comment.
Can you reply on the last comment?
It addresses your question as well
There was a problem hiding this comment.
@haimomesi I have work tasks where I need to use loop without play. These are different methods, you should separate them and let the app call them when necessary
add error handling information from Swift call to AVAudio
Actually play the file