-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AudioDispatcher.java #34
base: master
Are you sure you want to change the base?
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. |
@@ -92,6 +92,7 @@ public void setVolume(float volume) throws Exception { | |||
|
|||
public void loop() throws Exception { | |||
mediaPlayer.setLooping(true); | |||
invokePlay(0.0, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to play from scratch when we want to loop the current music
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reply on the last comment?
It addresses your question as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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
Actually play the file