Closed gulmensedat closed 4 years ago
how can we fix the image gets stuck on the screen when the video ends?
you can make the video position to zero.
like this:
/// 视频初始化完成回调
oninit: (controller) {
print("video oninit");
if (controller == null) {
controller = controller;
}
},
/// 视频播放回调
onplay: (value) {
print("video played");
},
/// 视频暂停回调
onpause: (value) {
print("video paused");
},
/// 视频播放结束回调
onended: (value) {
print("video ended");
controller.seekTo(Duration(seconds: 0));
},
onended: (value) { print("video ended"); controller.seekTo(Duration(seconds: 0)); },
controller.seekTo(Duration(seconds: 0));
there is a problem
onended: (value) { print("video ended"); controller.seekTo(Duration(seconds: 0)); },
controller.seekTo(Duration(seconds: 0));
there is a problem
Did you create the variable controller
on this page?
no I could not find?
no I could not find?
you can find it in the onint
callback.
no I could not find?
you can find it in the
onint
callback.
It gets 0 okay but it doesn't work for me. The video size changes as soon as the video ends. I want to make BoxFit.contain. While watching the video, it should be the same size as it ends. When the video is over, the duration of the video and whatever time it is found should write.
how can we fix the image gets stuck on the screen when the video ends?