appinio_video_player 1.0.1 copy "appinio_video_player: ^1.0.1" to clipboard
appinio_video_player: ^1.0.1 copied to clipboard

outdated

A custom video player that builds on top of the official video_player package by flutter and adds a fully customizable control bar and fullscreen functionality.

Custom Video Player #

This package wraps the official video_player package by flutter and extends it with a fully customisable control bar and a fullscreen mode. For the control bar you can decide for each element if you want to show it and if so how it should look.


Top Features #

  • Fullscreen Mode
  • Fully Customizable Controls
  • Fluid Progress Bar
  • Prevent Seeking in Progress Bar

Preview #

Fullscreen #


Getting started #

  • To get started just create a VideoPlayerController as you would for the normal video_player and define a source to use.
  • Secondly create a CustomVideoPlayerController to access the fullscreen and control bar visibility switches by yourself. Pass the controllers to a CustomVideoPlayer widget to use all its functionality and customisation oppurtunities.
  • On the examples tab you can see all parameters you can customize to your needs.

Usage #

class _MyHomePageState extends State<MyHomePage> {
  late VideoPlayerController videoPlayerController;
  CustomVideoPlayerController customVideoPlayerController =
      CustomVideoPlayerController();

  String videoUrl =
      "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";

  @override
  void initState() {
    super.initState();
    videoPlayerController = VideoPlayerController.network(videoUrl)
      ..initialize();
  }

  @override
  void dispose() {
    videoPlayerController.dispose();
    customVideoPlayerController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      navigationBar: CupertinoNavigationBar(
        middle: Text(widget.title),
      ),
      child: SafeArea(
        child: CustomVideoPlayer(
          customVideoPlayerController: customVideoPlayerController,
          videoPlayerController: videoPlayerController,
        ),
      ),
    );
  }
}

Made with ❤ by Flutter team at Appinio GmbH
227
likes
0
pub points
97%
popularity

Publisher

verified publisherappinio.app

A custom video player that builds on top of the official video_player package by flutter and adds a fully customizable control bar and fullscreen functionality.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, provider, video_player, wakelock

More

Packages that depend on appinio_video_player