efui_video_player 1.0.2 copy "efui_video_player: ^1.0.2" to clipboard
efui_video_player: ^1.0.2 copied to clipboard

discontinuedreplaced by: chewie
outdated

A custom Flutter video player powered by empathetech_flutter_ui

EFUI Video Player #

A versatile video player Widget powered by Empathetech's accessible Flutter UI!

Table of Contents #

Installation #

In your app's base directory, run

flutter pub add efui_video_player

And add the following import to any files that use the video player!

import 'package:efui_video_player/efui_video_player.dart';

Usage #

Provide EzVideoPlayer with a VideoPlayerController

@override
  void didChangeDependencies() {
    super.didChangeDependencies();
    _initializeVideoController();
  }

  late final VideoPlayerController _videoController;

  void _initializeVideoController() {
    _videoController = VideoPlayerController.asset(
      videoPath,
      videoPlayerOptions: VideoPlayerOptions(
        allowBackgroundPlayback: false,
        mixWithOthers: false,
      ),
    )..initialize().then((_) {
        setState(() {
          // Required or Chrome will get mad
          _videoController.setVolume(0.0);
        });
      });
  }

Then, customize EzVideoPlayer based on your needs

@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: EzScreen(
        decoration: BoxDecoration(color: offBlack),
        margin: EdgeInsets.zero,
        child: _videoController.value.isInitialized
            ? EzVideoPlayer(
                controller: _videoController,
                sliderVis: ButtonVis.alwaysOff,
                variableVolume: false,
                iconColor: Colors.white,
                semantics: "Empathetic logo animation",
              )
            : SizedBox.shrink(),
      ),
    );
  }

Options #

  • semantics: Video's semantics label for screen readers. Required.
  • iconColor: Color of the control buttons' icons. Required.
  • controlsBackground: BoxDecoration for the control section's background.
  • controlsMainAxis & controlsCrossAxis: Alignment of control buttons.
  • Button visibility: playVis,replayVis, volumeVis, and sliderVis
    • Options: auto, alwaysOn, or alwaysOff
    • showOnPause: Whether controls should show when the video is paused.
  • autoPlay: Whether the video should start automatically.
  • autoLoop: Whether the video should automatically restart when complete.
  • startingVolume: Initial volume level.
  • variableVolume: Whether a volume slider is present, or simply mute/un-mute.

Demo #

Checkout the example or see it...

Live #

Contributing #

Time #

Please reach out to the community contact about becoming a contributor.

Money #

Many thanks for any and all donations! We're happy to have helped!

Paypal #

paypal

Venmo #

Cash App #

Patreon #

Buy Me a Coffee #

Ko-fi #

License #

GNU GPLv3

Credits #

Flutter OSS #

efui_video_player wouldn't be as awesome as it is without these other awesome community projects...

And, of course, all the awesome Flutter (Google) devs.

0
likes
0
points
13
downloads

Publisher

verified publisherempathetech.net

Weekly Downloads

A custom Flutter video player powered by empathetech_flutter_ui

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

empathetech_flutter_ui, flutter, flutter_platform_widgets, video_player

More

Packages that depend on efui_video_player