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
Video player controller cannot reference a List of Strings/array of paths to videos to loop and make a playlist #22015
Comments
@Chimba123 dispose current controller and create new one with uri of video you want to play.And if you want autoplay functionality you need to check if current video is finished.Set listener on controller which checks current position of video against duration. |
Thanks
Could you please show me a sample if its not much trouble am not a veteran
programmer sometimes i need references to learn from.
Regards
…On Sep 19, 2018 09:40, "harisk92" ***@***.***> wrote:
@Chimba123 <https://github.com/Chimba123> dispose current controller and
create new one with url of video you want to play
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22015 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AiF_jUEQxRtcvdsRbTztL3dJXkciBlFEks5ucfTtgaJpZM4WvNQC>
.
|
@harisk92 do you have a working example? |
Sorry for late response. |
Thanks a lot harisk I'll try it out
…On Sep 21, 2018 08:49, "harisk92" ***@***.***> wrote:
@Chimba123 <https://github.com/Chimba123>
`void play(String url) {
controller = VideoPlayerController.network(url);
controller.initialize().then((_) => setState(() {}));
controller.play();
controller.addListener(checkIfVideoFinished);
}
void checkIfVideoFinished() {
if (controller == null ||
controller.value == null ||
controller.value.position == null) return;
if (controller.value.position.inSeconds ==
controller.value.duration.inSeconds) {
if (widget.videos.length - 1 > currentVideo) {
play(currentVideo + 1);
} else {
play(nextVideoUrl);
controller.removeListener(checkIfVideoFinished);
}
}
}`
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22015 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AiF_jfN7E07J8KrLtYNI2Sv9ZdEpAC3xks5udIvwgaJpZM4WvNQC>
.
|
Looks like this is about a support question that got answered. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The Video player plugin apparently cannot loop through a string of paths/array that reference multiple videos locally. The controller only accepts one string. What if one wants to display/play 50, 100 or even a 1000 videos? the controller is insufficient for this implementation lest I am missing something
The text was updated successfully, but these errors were encountered: