I have a setup where when the user hits play, it initializes the player (this._player.initFromUrl...), then once initialized a timer is started, and then the player plays (this._player.play()).
There are times that I want the initialization process to pause. It seems that .pause() does not do this--probably because .pause() is meant to stop playing (not stop initializing). Is there a way to pause initialization?
The best I have now is .dispose(), which I believe would stop the initialization, but then require the next initialization to start from scratch.
FYI, here are some use cases I have in mind:
--I want it so that if a user hits the audio play button it starts the playing process, and then hitting it again will start the process over again (so hitting the play button a second time will start the audio from the beginning).
--There are also times I want to be sure that if the user leaves the page while the initialization process is under way, the initialization stops then as well, to be sure the audio does not start when the user is on another page. dispose() works ok for this, but it would be nice just to leave it at pausing the initializing so if the user hits the back button to return to the audio page, the audio does not have to start from scratch if the user hits play.
I have a setup where when the user hits play, it initializes the player (this._player.initFromUrl...), then once initialized a timer is started, and then the player plays (this._player.play()).
There are times that I want the initialization process to pause. It seems that .pause() does not do this--probably because .pause() is meant to stop playing (not stop initializing). Is there a way to pause initialization?
The best I have now is .dispose(), which I believe would stop the initialization, but then require the next initialization to start from scratch.
FYI, here are some use cases I have in mind:
--I want it so that if a user hits the audio play button it starts the playing process, and then hitting it again will start the process over again (so hitting the play button a second time will start the audio from the beginning).
--There are also times I want to be sure that if the user leaves the page while the initialization process is under way, the initialization stops then as well, to be sure the audio does not start when the user is on another page. dispose() works ok for this, but it would be nice just to leave it at pausing the initializing so if the user hits the back button to return to the audio page, the audio does not have to start from scratch if the user hits play.