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

[Question] about loading next video #112

Closed
frgmt opened this issue Nov 6, 2019 · 4 comments
Closed

[Question] about loading next video #112

frgmt opened this issue Nov 6, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@frgmt
Copy link

frgmt commented Nov 6, 2019

@sarbagyastha Hi. Thank you for your great library!
Is this player available to load next video like below when current video reached the end?

if (_controller.value.playerState == PlayerState.ended) {
    _controller.videoId = '$id';
    _controller.play();
}
@frgmt frgmt added the enhancement New feature or request label Nov 6, 2019
@frgmt frgmt changed the title [question] [Question] about loading next video Nov 6, 2019
@sarbagyastha
Copy link
Owner

@frgmt use load or cue to load next video.

if (_controller.value.playerState == PlayerState.ended) {
    _controller.load(id);
}

@frgmt
Copy link
Author

frgmt commented Nov 6, 2019

@sarbagyastha wow, nice! thanx

@frgmt frgmt closed this as completed Nov 6, 2019
@amangautam1
Copy link

amangautam1 commented Nov 9, 2019

@sarbagyastha
controller.value.playerState == PlayerState.ended :
It never becomes true, only PlayerState.stopped is called when video ends. When trying to load video in 'stopped' condition, the UI is crashing.

@sarbagyastha
Copy link
Owner

@amangautam1 PlayerState.end is being called as intended. Is the issue present in example app too ?

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

No branches or pull requests

3 participants