Skip to content
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

Invoking reset() with autoPlay enabled throws exception #1044

Closed
TheHedge opened this issue Jan 21, 2016 · 2 comments
Closed

Invoking reset() with autoPlay enabled throws exception #1044

TheHedge opened this issue Jan 21, 2016 · 2 comments

Comments

@TheHedge
Copy link

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

    player.setAutoPlay(false);
    player.reset();
    player.setAutoPlay(true);
@LloydW93
Copy link
Member

I think this is a duplicate of #974.

@TheHedge
Copy link
Author

I agree. Sorry. Missed that issue in the list. this one can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants