With the help of this Package, you can create a video player like YT shorts and play-pause your video.
Getting started
You can use it easily! Just Import the package, and use it. You have some custom parameters to pass according to your needs you can change those.
BasickVideoPlayer(
videoUrl:
"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4",
overAllPadding: const EdgeInsets.all(10),
sizedboxHeight: 900,
circularProgressIndicatorColor: Colors.black,
clipBorder: BorderRadius.circular(20),
),
Installation
First, add basick_video_player
as a dependency
iOS
If you need to access videos using http
(rather than https
) URLs, you will need to add
the appropriate NSAppTransportSecurity
permissions to your app's Info.plist file, located
in <project root>/ios/Runner/Info.plist
. See
Apple's documentation
to determine the right combination of entries for your use case and supported iOS versions.
Android
If you are using network-based videos, ensure that the following permission is present in your
Android Manifest file, located in <project root>/android/app/src/main/AndroidManifest.xml
:
<uses-permission android:name="android.permission.INTERNET"/>
macOS
If you are using network-based videos, you will need to add the
com.apple.security.network.client
entitlement
Web
The Web platform does not support
dart:io
, so avoid using theVideoPlayerController.file
constructor for the plugin. Using the constructor attempts to create aVideoPlayerController.file
that will throw anUnimplementedError
.
* Different web browsers may have different video-playback capabilities (supported formats, autoplay...). Check package:video_player_web for more web-specific information.
The VideoPlayerOptions.mixWithOthers
option can't be implemented in web, at least at the moment. If you use this option in web it will be silently ignored.
Supported Formats
- On iOS and macOS, the backing player is AVPlayer. The supported formats vary depending on the version of iOS, AVURLAsset class has audiovisualTypes that you can query for supported av formats.
- On Android, the backing player is ExoPlayer, please refer here for list of supported formats.
- On Web, available formats depend on your users' browsers (vendor and version). Check package:video_player_web for more specific information.
Features
A Flutter widget that allows you to play and pause the video similar to YT shorts. A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface.
Android | iOS | macOS | Web | |
---|---|---|---|---|
Support | SDK 16+ | 12.0+ | 10.14+ | Any* |
Additional information
Author: Palash Dutta Banik In a video player the basic need is the user can have the option to play and pause the video. So, here we go. We have added this fuctionality here. Package Name: Basick Video Player