You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reset() calls attachSource(null), which calls resetAndPlay(), which will then error because there is no source.
I'm working around this currently by wrapping attachSource's resetAndPlay around an if (urlOrManifest) but not sure if that's the best way. I'm also unsure on why attaching a source is supposed to always start playback.
The text was updated successfully, but these errors were encountered:
Thanks for opening the issue . There will most likely be a lot of these little things so Ill start trying to set up unit test for small scenarios like this.
Invoking the reset() function in MediaPlayer.js results in the play() function throwing the "Missing view or source." exception.
With recent changes and issues in dash.js, autoPlay must be enabled (see issue # 1027 #1027). This results in the following sequence of events if reset() is invoked.
reset() sets source and element to null via the following.
function reset() {
//todo add all vars in reset that need to be in here
attachSource(null);
attachView(null);
protectionController = null;
protectionData = null;
}
attachSource() invokes resetAndPlay() which then invokes play() if autoPlay is enabled.
play() throws an exception if element or source is not set.
The only way to use reset() at this point is to bracket all invocations as follows
Consider the following:
reset() calls attachSource(null), which calls resetAndPlay(), which will then error because there is no source.
I'm working around this currently by wrapping attachSource's resetAndPlay around an
if (urlOrManifest)
but not sure if that's the best way. I'm also unsure on why attaching a source is supposed to always start playback.The text was updated successfully, but these errors were encountered: