video_js_player 0.0.18 copy "video_js_player: ^0.0.18" to clipboard
video_js_player: ^0.0.18 copied to clipboard

Video Library for Flutter, Easily use famuse video.js in flutter web

Web Video Player for Flutter

MIT License pub version Buy Me A Coffee

A Flutter package that provides a web-based video player using Video.js and flutter_inappwebview. This package allows you to integrate a customizable video player in your Flutter application with features like full-screen mode, picture-in-picture, track selection, and more.

πŸš€ Features

  • Play videos from various sources using Video.js

  • Full-screen and Picture-in-Picture (PiP) support

  • Seek, play, and pause controls

  • Change text and audio tracks dynamically

  • Add remote text tracks (subtitles)

  • Works on Android, iOS, and Web

πŸ“¦ Installation

Add the package to your pubspec.yaml:

dependencies:
  web_video_player: latest_version

Then, run:

flutter pub get

πŸ”§ Usage

1️⃣ Import the package:

import 'package:web_video_player/web_video_player.dart';

2️⃣ Initialize the Controller:

final _controller = WebVideoPlayerController();

3️⃣ Embed the Player:

WebVideoPlayer(
  controller: _controller,
  source: WebPlayerSource(
    src: "https://your-video-url.mp4",
    type: "video/mp4",
  ),
)

πŸŽ› API & Controls

Method Description
play() Plays the video
pause() Pauses the video
seekTo(seconds) Seeks to a specific time
toggleFullScreenMode() Toggles full-screen mode
requestPictureInPicture() Enables Picture-in-Picture mode
changeTextTrack(id) Changes the subtitle track
changeAudioTracks(id) Changes the audio track
addRemoteTextTrack({...}) Adds external subtitles

πŸ–₯️ Platform Support

Platform Support
βœ… Android βœ”οΈ
βœ… iOS βœ”οΈ
βœ… Web βœ”οΈ

πŸ’‘ Notes

This package uses flutter_inappwebview to embed Video.js in a WebView.

πŸ“œ License

This project is licensed under the MIT License.

πŸ“¬ Contact & Contributions

Contributions are welcome! Feel free to open an issue or submit a pull request. πŸš€

4
likes
140
points
39
downloads

Publisher

verified publisheremintolgahanpolat.com

Weekly Downloads

Video Library for Flutter, Easily use famuse video.js in flutter web

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

audio_video_progress_bar, flutter, flutter_inappwebview, visibility_detector

More

Packages that depend on video_js_player