pod_player
pod_player copied to clipboard
Using videoSeekTo after changeVideo does not work.
When I use changeVideo, it is not allowing me to use the videoSeekTo to update position of video.
if (videoController != null) {
videoController!.pause();
videoController!.changeVideo(
playVideoFrom: PlayVideoFrom.vimeo(videoData.video_id.toString()),
);
videoController!.videoSeekTo(
parseDuration(post.duration ?? Duration.zero.toString()));
} else {
videoController = PodPlayerController(
playVideoFrom: PlayVideoFrom.vimeo(
videoData.video_id.toString(),
videoPlayerOptions: VideoPlayerOptions(
allowBackgroundPlayback: true,
mixWithOthers: true,
),
),
podPlayerConfig: const PodPlayerConfig(
autoPlay: true,
forcedVideoFocus: true,
wakelockEnabled: true,
))
..initialise()
..videoSeekTo(parseDuration(post.duration ?? Duration.zero.toString()));
}
i am also facing the same issue. Please provide a solution for this.
await on changeVideo function and then call videoSeekTo function