pod_player icon indicating copy to clipboard operation
pod_player copied to clipboard

Using videoSeekTo after changeVideo does not work.

Open ghost opened this issue 2 years ago • 3 comments

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()));
}

ghost avatar Jun 21 '23 12:06 ghost

i am also facing the same issue. Please provide a solution for this.

aman-toor avatar Aug 20 '23 05:08 aman-toor

await on changeVideo function and then call videoSeekTo function

newtaDev avatar Aug 20 '23 07:08 newtaDev