chewie icon indicating copy to clipboard operation
chewie copied to clipboard

Play Pause and 10sec forward backword option not appearing once seek to a position or clicking on 10sec forward backword buttons.

Open saiful00000 opened this issue 8 months ago • 1 comments

Once its start buffering when seeking the progress of by clicking 10sec forward or backward button its keep showing the Circular Progress Indicator even after video play completed.

Reproducible code:

import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

class MovieVideoPlayer extends StatefulWidget {
  final String? url;

  const MovieVideoPlayer({super.key, required this.url});

  @override
  State<MovieVideoPlayer> createState() => _MovieVideoPlayerState();
}

class _MovieVideoPlayerState extends State<MovieVideoPlayer> {
  late final VideoPlayerController playerController;
  late final ChewieController chewieController;

  @override
  void initState() {
    playerController = VideoPlayerController.networkUrl(
      Uri.parse(widget.url ?? 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'),
    );
    chewieController = ChewieController(
      videoPlayerController: playerController,
      aspectRatio: 16 / 9,
      allowedScreenSleep: false,
      allowFullScreen: true,
    );

    super.initState();
  }

  @override
  void dispose() {
    playerController.dispose();
    chewieController.dispose();

    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (widget.url == null) {
      return const Center(
        child: Text('No video found.'),
      );
    }
    return AspectRatio(
      aspectRatio: 16 / 9,
      child: Chewie(
        controller: chewieController,
      ),
    );
  }
}

saiful00000 avatar Mar 22 '25 10:03 saiful00000

to add more context, this happens in case of listview with videos.

  video_player: 2.9.3
  chewie: 1.11.0

dharmic6 avatar Mar 25 '25 16:03 dharmic6