Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Overview

Better Player

pub package pub package pub package

Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run.

Introduction

This plugin is based on Chewie. Chewie is awesome plugin and works well in many cases. Better Player is a continuation of ideas introduced in Chewie. Better player fix common bugs, adds more configuration options and solves typical use cases.

Features:
✔️ Fixed common bugs
✔️ Added advanced configuration options
✔️ Refactored player controls
✔️ Playlist support
✔️ Video in ListView support
✔️ Subtitles support: (formats: SRT, WEBVTT with HTML tags support; subtitles from HLS; multiple subtitles for video)
✔️ HTTP Headers support
✔️ BoxFit of video support
✔️ Playback speed support
✔️ HLS support (track, subtitles (also segmented), audio track selection)
✔️ DASH support (track, subtitles, audio track selection)
✔️ Alternative resolution support
✔️ Cache support
✔️ Notifications support
✔️ Picture in Picture support
✔️ DRM support (token, Widevine, FairPlay EZDRM).
✔️ ... and much more!

Documentation

Important information

This plugin development is in progress. You may encounter breaking changes each version. This plugin is developed part-time for free. If you need some feature which is supported by other players available in pub dev, then feel free to create PR. All valuable contributions are welcome!

Comments
  • [BUG] Build issues on Xcode 13

    [BUG] Build issues on Xcode 13

    1. Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
    2. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for better_player.better_player)
    3. While running pass #1731 SILFunctionTransform "PredictableDeadAllocationElimination" on SILFunction "@$s13better_player17CachingPlayerItemC22ResourceLoaderDelegateC16startDataRequest4withy10Foundation3URLV_tF". for 'startDataRequest(with:)' (at /Users/xyz/Development/flutter/.pub-cache/hosted/pub.dartlang.org/better_player-0.0.74/ios/Classes/CachingPlayerItem.swift:66:9) Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it): 0 swift-frontend 0x000000010b6e76f7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39 1 swift-frontend 0x000000010b6e6688 llvm::sys::RunSignalHandlers() + 248 2 swift-frontend 0x000000010b6e7d06 SignalHandler(int) + 278 3 libsystem_platform.dylib 0x00007fff204afd7d _sigtramp + 29 4 libsystem_platform.dylib 0x00007ffee94c5310 _sigtramp + 18446744072786892208 5 swift-frontend 0x00000001071f7e47 (anonymous namespace)::PredictableDeadAllocationElimination::run() + 6855 6 swift-frontend 0x00000001072247b9 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 4409 7 swift-frontend 0x000000010722092b swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 155 8 swift-frontend 0x000000010723b20c swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 60 9 swift-frontend 0x0000000107229005 llvm::Expectedswift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncachedswift::ExecuteSILPipelineRequest(swift::ExecuteSILPipelineRequest const&) + 469 10 swift-frontend 0x000000010722b3bb swift::runSILDiagnosticPasses(swift::SILModule&) + 187 11 swift-frontend 0x00000001069746de swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 62 12 swift-frontend 0x000000010681fd59 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_deleteswift::SILModule >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1161 13 swift-frontend 0x0000000106811d46 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 13494 14 swift-frontend 0x0000000106753a48 main + 1032 15 libdyld.dylib 0x00007fff20485f3d start + 1 error: Segmentation fault: 11 (in target 'better_player' from project 'Pods')
    bug 
    opened by arnoutvandervorst 48
  • [BUG] having BackDropFilter below video player breaks the page on IOS

    [BUG] having BackDropFilter below video player breaks the page on IOS

    History check Please confirm that you've checked issues history and you didn't find anything which may solve your issue.

    https://user-images.githubusercontent.com/17206638/128587364-c93bd44e-f5b5-47da-b983-ba47a3cd9583.MP4

    Describe the bug https://user-images.githubusercontent.com/17206638/128587364-c93bd44e-f5b5-47da-b983-ba47a3cd9583.MP4

    To Reproduce Steps to reproduce the behavior: I have a Stack where i am applying blur effects first then showing things on top of the blur effects, when i place the video is blurs everything above it

    Screenshots https://user-images.githubusercontent.com/17206638/128587364-c93bd44e-f5b5-47da-b983-ba47a3cd9583.MP4

    Flutter doctor Please add flutter doctor output here.

    Better Player version

    • Version: lastest

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone 11 max]

    Additional context Add any other context about the problem here.

    bug 
    opened by jeremiahlukus 28
  • [BUG] Video is not working on iOS but audio works fine

    [BUG] Video is not working on iOS but audio works fine

    Android is fine but the problem is happening on iOS. The video is not working, always shows a blank screen but the audio works fine. Tested on iOS simulator 14.4.

    Code Sample

    class LocalVideoPlayer extends StatefulWidget {
      const LocalVideoPlayer({Key? key, required this.videoUrl}) : super(key: key);
    
      final String videoUrl;
    
      @override
      _LocalVideoPlayerState createState() => _LocalVideoPlayerState();
    }
    
    class _LocalVideoPlayerState extends State<LocalVideoPlayer> {
      late BetterPlayerController _betterPlayerController;
    
      @override
      void initState() {
        super.initState();
        BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(BetterPlayerDataSourceType.network, widget.videoUrl);
        _betterPlayerController = BetterPlayerController(
          
          BetterPlayerConfiguration(
            deviceOrientationsAfterFullScreen: const [DeviceOrientation.portraitUp],
            aspectRatio: 16/9,
            controlsConfiguration: BetterPlayerControlsConfiguration(
              enableSkips: false, 
              enableOverflowMenu: false,
            )
          ),
          betterPlayerDataSource: betterPlayerDataSource,
          
        );
      }
    
      @override
      Widget build(BuildContext context) {
        return AspectRatio(
            aspectRatio: 16 / 9,
            child: BetterPlayer(
              controller: _betterPlayerController,
            )
        );
      }
    }
    

    Snapshot Simulator Screen Shot - iPhone 12 Pro Max - 2021-07-15 at 11 44 20

    Flutter Version

    Last login: Wed Jul 14 18:32:00 on ttys002
    rakibbhuiyan@Rakibs-iMac ~ % flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.2.3, on Mac OS X 10.15.7 19H15 darwin-x64, locale
        en-GB)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.2)
    [✓] VS Code (version 1.58.0)
    [✓] Connected device (2 available)
    
    • No issues found!
    rakibbhuiyan@Rakibs-iMac ~ % 
    
    
    info required 
    opened by rakib205 26
  • How to add preview image to player

    How to add preview image to player

    I want to show a picture before the play button is pressed. I'm trying to use a placeholder like this:

    BetterPlayerConfiguration(
       placeholder: Image.network( '<url>' ),
       fit: BoxFit.contain,
    )
    

    The problem is, after video starts, the placeholder stays as background and I can see it because the video is streched out: placeholder

    Notice that it's BoxFit.contain so the video isn't distorted and that's why I can see the placeholder as background (I have tried all `BoxFit' and it distorts the video or I can see the placeholder). Maybe it's an aspect radio problem?

    Any way to hide it when the video starts?

    bug help wanted 
    opened by alurei97 23
  • [BUG] Cannot play HLS video

    [BUG] Cannot play HLS video

    I have an issue when play m3u8 file. It alway show loading but not show any log unil out of time. I try to view in VLC or Safari. It still work but i don't why. Can you help me what i miss Here is my HLS

    #EXTM3U #EXT-X-VERSION:3 #EXT-X-ALLOW-CACHE:NO #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:55

    #EXTINF:3.960, /live/box_1_cam_15168/1629795925.ts #EXTINF:3.960, /live/box_1_cam_15168/1629795929.ts #EXTINF:3.960, /live/box_1_cam_15168/1629795933.ts

    info required 
    opened by hungharry123 20
  • [BUG] Video in list fails to load even in BetterPlayer example

    [BUG] Video in list fails to load even in BetterPlayer example

    im getting a bug "Black screen with Video can't be played" while trying the BetterPlayr Video in List, is reproduced in BetterPlayer examples such as 'Video in list'.

    Steps to reproduce it:

    set videos count to 30 for dataList in Video in list. make a fast scroll. all players will show the Video can't be played screen. tested on Samsung S10

    https://user-images.githubusercontent.com/32723106/148972893-bbeb1eb5-48b1-4d88-8ede-042d42d4c92e.mp4

    new issue 
    opened by sabriboughanmi 19
  • [BUG] Does not play video ? (Format: hls(scalable or drm or GnuTLS) )

    [BUG] Does not play video ? (Format: hls(scalable or drm or GnuTLS) )

    Describe the bug better_player doesn't play this but plays mpv player

    To Reproduce

        BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(
          BetterPlayerDataSourceType.network,
          "https://dbx.molystream.net/embed/27756-602d4e94a12d7f654d26a6f3/sheila",
          videoFormat: BetterPlayerVideoFormat.hls,
          headers: {
            "Referer":
                "https://ydx.molystream.net/embed/27756-602d4e94a12d7f654d26a6f3",
            "User-Agent":
                "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0"
          },
        );
    

    Expected behavior should play because it plays mpv player (Gives an error but still plays)

    https://user-images.githubusercontent.com/12005386/108413417-e9173980-7222-11eb-9c75-1b68a408b372.mp4

    it is mpv player: https://github.com/mpv-player/mpv

    mpv.sh

    mpv --ytdl-raw-options=config-location="dene.conf" "https://dbx.molystream.net/embed/27756-602d4e94a12d7f654d26a6f3/sheila"
    

    dene.conf

    --add-header "Referer: https://ydx.molystream.net/embed/27756-602d4e94a12d7f654d26a6f3"
    --add-header "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0"
    

    Ekran görüntüsü_2021-02-18_22-59-51

    and run:

    bash mpv.sh
    

    Flutter doctor [✓] Flutter (Channel stable, 1.22.6, on Linux, locale tr_TR.utf8)

    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)

    Better Player version

    • Version: ^0.0.55

    Additional context Ekran görüntüsü_2021-02-18_23-07-59 link to video link: click..

    bug info required 
    opened by lavara123 18
  • Player causes app to crash on iOS

    Player causes app to crash on iOS

    Describe the bug Application crashes with EXC_BAD_ACCESS (KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED)

    To Reproduce On iOS quickly create and recreate a BetterPlayer instances. I will try to recreate the issue with a short code sample and see if I can manage it.

    Flutter doctor

    flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H512 darwin-x64, locale
        en-GB)
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    [!] Android Studio (version 4.1)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [!] IntelliJ IDEA Ultimate Edition (version 2020.2.3)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [!] IntelliJ IDEA Community Edition (version 2020.2.3)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.53.0)
    [✓] Connected device (1 available)
    
    ! Doctor found issues in 3 categories.
    

    Better Player version

    • Version: 0.0.51

    Smartphone (please complete the following information):

    • Device: iPhone 6 Plus
    • OS: e.g. iOS13

    Additional context Bellow are some grabs from xcode showing what methods are being called when the crash occurs.

    image

    image

    image

    The issue does not occur in android... I can skip as fast as I like through videos and there are no issues.

    I am not using a playlist to manage the videos.

    new issue 
    opened by billy1380 17
  • [BUG] Video is still playing after calling dispose

    [BUG] Video is still playing after calling dispose

    Describe the bug The video is playing and when calling dispose and setting the controller to null, the video keeps playing (in logs).

    To Reproduce Steps to reproduce the behavior:

    1. Build the sample app
    2. see that the video is playing
    3. scroll to bottom until you don't see the video in the screen anymore
    4. see the logs telling "disposed"
    5. see the logs of the MediaCoder that keeps decoding / building frames

    *Example code

    import 'package:better_player/better_player.dart';
    import 'package:flutter/material.dart';
    import 'package:provider/provider.dart';
    import 'package:visibility_detector/visibility_detector.dart';
    
    void main() => runApp(const VideoPlayerApp());
    
    class VideoPlayerApp extends StatelessWidget {
      const VideoPlayerApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          title: 'Video Player Demo',
          home: VideoPlayerScreen(),
        );
      }
    }
    
    class VideoPlayerScreen extends StatefulWidget {
      const VideoPlayerScreen({Key? key}) : super(key: key);
    
      @override
      _VideoPlayerScreenState createState() => _VideoPlayerScreenState();
    }
    
    class _VideoPlayerScreenState extends State<VideoPlayerScreen> {
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: ListView.builder(
            itemCount: 10,
              itemBuilder: (context, index) {
            return index == 1 ? VideoItem() : Container(margin: EdgeInsets.all(20), width: 200, height: 200, color: Colors.red);
          })
        );
      }
    }
    
    class VideoItem extends StatefulWidget {
    
      @override
      _VideoItemState createState() => _VideoItemState();
    }
    
    class _VideoItemState extends State<VideoItem> {
    
      BetterPlayerController? controller;
      final SimpleProvider simpleProvider = SimpleProvider();
    
      void initPlayer() {
        controller = BetterPlayerController(
          BetterPlayerConfiguration(
            aspectRatio: 16/9,
              looping: true,
              autoPlay: true,
              autoDispose: false,
              handleLifecycle: false,
              controlsConfiguration: BetterPlayerControlsConfiguration(showControls: false)
          ),
          betterPlayerDataSource: BetterPlayerDataSource(
            BetterPlayerDataSourceType.network,
              'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
          )
        );
      }
    
      void onVisibilityChanged(double fraction) {
        print("Fraction is : $fraction");
        if (fraction == 0) {
          if (controller != null) {
            controller!.dispose();
            controller = null;
            simpleProvider.notify();
            print("Controller is disposed.");
          }
        } else {
          if (controller == null) {
            initPlayer();
            print("Controller is a new one.");
            simpleProvider.notify();
          }
          /*
          if (fraction >= 0.8 && controller!.isVideoInitialized() != null && controller!.isVideoInitialized()!) {
            if (controller!.isPlaying() != null && controller!.isPlaying()!) {
              controller!.pause();
            }
            else {
              controller!.play();
            }
          }
    
           */
        }
      }
    
      @override
      void initState() {
        super.initState();
        initPlayer();
      }
    
      @override
      void dispose() {
        if (controller != null) {
          controller!.dispose();
          controller = null;
          print("Disposed controller from Framework.");
        }
        super.dispose();
      }
    
    
      @override
      Widget build(BuildContext context) {
        return ChangeNotifierProvider.value(value: simpleProvider,
          child: VisibilityDetector(key: GlobalKey(),
              child: Consumer<SimpleProvider>(
                builder: (context, model, child) {
                  return controller != null ? BetterPlayer(controller: controller!) : Container(width: 200, height: 200, color: Colors.blue);
                },
              ),
              onVisibilityChanged: (info) {
            onVisibilityChanged(info.visibleFraction);
              }),
        );
      }
    }
    
    class SimpleProvider extends ChangeNotifier {
    
      void notify() {
        notifyListeners();
      }
    }
    

    Expected behavior I expect the player to be released when we call controller.dispose(), meaning that the MediaCodec should be closed, as well as the AudioCodec and stop seeing logs of frames => video not playing ?

    Flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale fr-FR)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [!] Android Studio (version 2020.3)
        ✗ Unable to find bundled Java version.
    [✓] Connected device (3 available)
    
    ! Doctor found issues in 1 category.
    

    Better Player version

    • Version: 0.0.73

    Smartphone (please complete the following information):

    • Device: OPPO, Iphone XS Max
    • OS: Android / IOS

    Additional context I am simply trying to do a "reusable" controller so that i can play multiple videos in ListView with only one playing at the same time and the same controller for every video to avoid OOM errors. That's why i am using such implementation, probably not optimal though.

    I have checked your sample code about ReusableVideoList widgets, but i simply need to do this with a single controller so i have tried to simply the code.

    The problem is that with such configuration (and this error) i have another error if i have several videos that tells this.

    Thank you for your time

    info required 
    opened by Tom3652 15
  • [BUG] [iOS] Big .mp4 files not playing correctly

    [BUG] [iOS] Big .mp4 files not playing correctly

    Describe the bug When trying to reproduce big .mp4 videos on iOS doesn't load properly, smaller files work normally. Everything works perfectly on Android.

    The code is very similar to placeholder example.

    As I said, with a small video (280 MB) like this one works good:

    BetterPlayerDataSource dataSource = BetterPlayerDataSource(
          BetterPlayerDataSourceType.network,
          Uri.encodeFull("https://www.documentarymania.org/video_flutter.php?title=Cirque du Soleil Journey of Man")
        );
    

    But a bigger file such as this one (620 MB) doesn't:

    BetterPlayerDataSource dataSource = BetterPlayerDataSource(
          BetterPlayerDataSourceType.network,
          Uri.encodeFull("https://www.documentarymania.org/video_flutter.php?title=Gravity")
        );
    

    And it produces this error:

    2021-01-12 20:48:20.477422+0100 3D Online Films[1875:206969] Update playing state
    
    2021-01-12 20:48:22.863760+0100 3D Online Films[1875:206969] Update playing state
    
    2021-01-12 20:48:22.878299+0100 3D Online Films[1875:206969] OnReadyToPlay
    
    2021-01-12 20:48:23.357413+0100 3D Online Films[1875:208721] Task <A01AE462-0E9D-4D7C-9494-63D580A73447>.<10> load failed with error Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://www.documentarymania.org/video_flutter.php?title=Gravity, NSErrorFailingURLKey=https://www.documentarymania.org/video_flutter.php?title=Gravity, _NSURLErrorRelatedURLSessionTaskErrorKey=(
        "LocalDataTask <A01AE462-0E9D-4D7C-9494-63D580A73447>.<10>"
    ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <A01AE462-0E9D-4D7C-9494-63D580A73447>.<10>, NSLocalizedDescription=cancelled} [-999]
    
    2021-01-12 20:48:23.363356+0100 3D Online Films[1875:208552] Task <A01AE462-0E9D-4D7C-9494-63D580A73447>.<10> finished with error - code: -999
    
    2021-01-12 20:48:23.784518+0100 3D Online Films[1875:208558] Task <0E2D183D-E934-481D-AC2C-6110F6BD2CA1>.<11> load failed with error Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://www.documentarymania.org/video_flutter.php?title=Gravity, NSErrorFailingURLKey=https://www.documentarymania.org/video_flutter.php?title=Gravity, _NSURLErrorRelatedURLSessionTaskErrorKey=(
        "LocalDataTask <0E2D183D-E934-481D-AC2C-6110F6BD2CA1>.<11>"
    ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0E2D183D-E934-481D-AC2C-6110F6BD2CA1>.<11>, NSLocalizedDescription=cancelled} [-999]
    
    2021-01-12 20:48:23.793225+0100 3D Online Films[1875:208558] Task <0E2D183D-E934-481D-AC2C-6110F6BD2CA1>.<11> finished with error - code: -999
    
    
    and it repeats again and again...
    

    I also tried using and commenting cache settings but it still doesn't work.

    Better Player version

    • Version: 0.0.44

    Smartphone:

    • Device: iPhone 6
    • OS: iOS 12.4.9
    help wanted 
    opened by alurei97 15
  • [BUG] can't compile on Android

    [BUG] can't compile on Android

    History check Done.

    Describe the bug When launching app on Android I get the following error.

    .../android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:24: error: package com.jhomlala.better_player does not exist
          flutterEngine.getPlugins().add(new com.jhomlala.better_player.BetterPlayerPlugin());
    

    Flutter doctor

    [✓] Flutter (Channel stable, 2.8.1)
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2020.3)
    [✓] VS Code (version 1.63.2)
    [✓] Connected device (4 available)
    

    Better Player version

    • Version: 0.0.81
    new issue 
    opened by marcoberetta96 14
  • Cant load remain of a network video that not completely cached, between app sessions

    Cant load remain of a network video that not completely cached, between app sessions

    HI. thanks for youre package @jhomlala All my problems have been solved but i cant solve this one

    when loading video first time from internet it is ok...precached and loaded very good. but When you watch a video until the middle it precached only half of the video and when u want to play that in another page it is playing until the middle of video and not load anymore.

    This is my betterplayerdatasources BetterPlayerDataSource.network( url, placeholder: const SizedBox(), bufferingConfiguration: const BetterPlayerBufferingConfiguration( minBufferMs: 1000, maxBufferMs: 1000, bufferForPlaybackMs: 1000, bufferForPlaybackAfterRebufferMs: 1000, ), cacheConfiguration: BetterPlayerCacheConfiguration( useCache: true, key: url, preCacheSize: 1 * 1024 * 1024, maxCacheFileSize: 20 * 1024 * 1024, maxCacheSize: 100 * 1024 * 1024, ), )

    and I used reusable controller for my app just like the source project.

    https://user-images.githubusercontent.com/120022216/211195699-1da82a63-bce8-4f82-a0b1-d9b74cccc3e7.mp4

    new issue 
    opened by RezaKhajvand 0
  • Unhandled Exception: seen

    Unhandled Exception: seen

    E/flutter (19982): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: seen E/flutter (19982): #0 VideoService.episodeView package:tebyad/…/RestApi/video_service.dart:101 E/flutter (19982): E/flutter (19982): [GETX] CLOSE DIALOG 879196732 [GETX] GOING TO ROUTE /Widget I/ExoPlayerImpl(19982): Release 5ce6622 [ExoPlayerLib/2.18.1] [joyeuse, Redmi Note 9 Pro, Xiaomi, 30] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder] I/ExoPlayerImpl(19982): Init 668a31e [ExoPlayerLib/2.18.1] [joyeuse, Redmi Note 9 Pro, Xiaomi, 30] E/MethodChannel#better_player_channel(19982): Failed to handle method call E/MethodChannel#better_player_channel(19982): java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider no longer handles null by instantiating a new DefaultDrmSessionManagerProvider. Explicitly construct and pass an instance in order to retain the old behavior. E/MethodChannel#better_player_channel(19982): at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:174) E/MethodChannel#better_player_channel(19982): at com.google.android.exoplayer2.source.ProgressiveMediaSource$Factory.setDrmSessionManagerProvider(ProgressiveMediaSource.java:186) E/MethodChannel#better_player_channel(19982): at com.jhomlala.better_player.BetterPlayer.buildMediaSource(BetterPlayer.kt:430) E/MethodChannel#better_player_channel(19982): at com.jhomlala.better_player.BetterPlayer.setDataSource(BetterPlayer.kt:196) E/MethodChannel#better_player_channel(19982): at com.jhomlala.better_player.BetterPlayerPlugin.setDataSource(BetterPlayerPlugin.kt:277) E/MethodChannel#better_player_channel(19982): at com.jhomlala.better_player.BetterPlayerPlugin.onMethodCall(BetterPlayerPlugin.kt:151) E/MethodChannel#better_player_channel(19982): at com.jhomlala.better_player.BetterPlayerPlugin.onMethodCall(BetterPlayerPlugin.kt:138) E/MethodChannel#better_player_channel(19982): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/MethodChannel#better_player_channel(19982): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MethodChannel#better_player_channel(19982): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MethodChannel#better_player_channel(19982): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MethodChannel#better_player_channel(19982): at android.os.Handler.handleCallback(Handler.java:938) E/MethodChannel#better_player_channel(19982): at android.os.Handler.dispatchMessage(Handler.java:99) E/MethodChannel#better_player_channel(19982): at android.os.Looper.loop(Looper.java:236) E/MethodChannel#better_player_channel(19982): at android.app.ActivityThread.main(ActivityThread.java:7861) E/MethodChannel#better_player_channel(19982): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#better_player_channel(19982): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600) E/MethodChannel#better_player_channel(19982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967) E/flutter (19982): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, MediaSource.Factory#setDrmSessionManagerProvider no longer handles null by instantiating a new DefaultDrmSessionManagerProvider. Explicitly construct and pass an instance in order to retain the old behavior., null, java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider no longer handles null by instantiating a new DefaultDrmSessionManagerProvider. Explicitly construct and pass an instance in order to retain the old behavior. E/flutter (19982): at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:174) E/flutter (19982): at com.google.android.exoplayer2.source.ProgressiveMediaSource$Factory.setDrmSessionManagerProvider(ProgressiveMediaSource.java:186) E/flutter (19982): at com.jhomlala.better_player.BetterPlayer.buildMediaSource(BetterPlayer.kt:430) E/flutter (19982): at com.jhomlala.better_player.BetterPlayer.setDataSource(BetterPlayer.kt:196) E/flutter (19982): at com.jhomlala.better_player.BetterPlayerPlugin.setDataSource(BetterPlayerPlugin.kt:277) E/flutter (19982): at com.jhomlala.better_player.BetterPlayerPlugin.onMethodCall(BetterPlayerPlugin.kt:151) E/flutter (19982): at com.jhomlala.better_player.BetterPlayerPlugin.onMethodCall(BetterPlayerPlugin.kt:138) E/flutter (19982): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/flutter (19982): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/flutter (19982): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter (19982): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter (19982): at android.os.Handler.handleCallback(Handler.java:938) E/flutter (19982): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter (19982): at android.os.Looper.loop(Looper.java:236) E/flutter (19982): at android.app.ActivityThread.main(ActivityThread.java:7861) E/flutter (19982): at java.lang.reflect.Method.invoke(Native Method) E/flutter (19982): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600) E/flutter (19982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967) E/flutter (19982): ) E/flutter (19982): #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:653 E/flutter (19982): #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:296 E/flutter (19982): E/flutter (19982): #2 MethodChannelVideoPlayer.setDataSource package:better_player/…/video_player/method_channel_video_player.dart:118

    new issue 
    opened by pouyamaroufi 3
  •  Unhandled Exception: PlatformException(error, MediaSource.

    Unhandled Exception: PlatformException(error, MediaSource.

    [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(error, MediaSource.Factory#setDrmSessionManagerProvider no longer handles null by instantiating a new DefaultDrmSessionManagerProvider. Explicitly construct and pass an instance in order to retain the old behavior., null, java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider no longer handles null by instantiating a new DefaultDrmSessionManagerProvider. Explicitly construct and pass an instance in order to retain the old behavior. E/flutter (16072): at b9.a.f() E/flutter (16072): at e8.j0$b.d() E/flutter (16072): at com.jhomlala.better_player.a.p() E/flutter (16072): at com.jhomlala.better_player.a.H() E/flutter (16072): at cd.g.t() E/flutter (16072): at cd.g.q() E/flutter (16072): at cd.g.f() E/flutter (16072): at te.k$a.a() E/flutter (16072): at ge.c.l() E/flutter (16072): at ge.c.m() E/flutter (16072): at ge.c.i() E/flutter (16072): at ge.b.run() E/flutter (16072): at android.os.Handler.handleCallback(Handler.java:754) E/flutter (16072): at android.os.Handler.dispatchMessage(Handler.java:95) E/flutter (16072): at android.os.Looper.loop(Looper.java:163) E/flutter (16072): at android.app.ActivityThread.main(ActivityThread.java:6238) E/flutter (16072): at java.lang.reflect.Method.invoke(Native Method) E/flutter (16072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) E/flutter (16072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) E/flutter (16072): ) E/flutter (16072): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607) E/flutter (16072): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167) E/flutter (16072): E/flutter (16072): #2 MethodChannelVideoPlayer.setDataSource (package:better_player/src/video_player/method_channel_video_player.dart:118) E/flutter (16072): E/flutter (16072): #3 VideoPlayerController._setDataSource (package:better_player/src/video_player/video_player.dart:408) E/flutter (16072): E/flutter (16072): #4 BetterPlayerController._setupDataSource (package:better_player/src/core/better_player_controller.dart:444) E/flutter (16072): E/flutter (16072): #5 BetterPlayerController.setupDataSource (package:better_player/src/core/better_player_controller.dart:274) E/flutter (16072): E/flutter (16072):

    new issue 
    opened by Deepak96321 0
  • [BUG]issues even in the reusable video list of example app

    [BUG]issues even in the reusable video list of example app

    when scrolling in the reusable video list page some of videos not load to play...and after more scrolling alll the videos wont load anymore....i use last version of better player.

    https://user-images.githubusercontent.com/120022216/208943622-39c626d6-cf38-4862-9589-6a18bebfa33c.mp4

    new issue 
    opened by RezaKhajvand 0
  • [BUG]Upgrade the flutter sdk to more than 3.0, better_ Player and flutter_ widget_ from_ HTML conflict, video cannot be played

    [BUG]Upgrade the flutter sdk to more than 3.0, better_ Player and flutter_ widget_ from_ HTML conflict, video cannot be played

    History check Please confirm that you've checked issues history and you didn't find anything which may solve your issue.

    Describe the bug Upgrade the flutter sdk to more than 3.0, better_ Player and flutter_ widget_ from_ HTML conflict, video cannot be played

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    *Example code Paste here your minimal reproducible code. This code should be ready to copy-paste-run.

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Flutter doctor [✓] Flutter (Channel stable, 3.3.3, on macOS 13.0.1 22A400 darwin-x64, locale zh-Hans-CN)

    Better Player version

    • Version: 0.0.83

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone6]
    • OS: [e.g. iOS8.1]

    Additional context Add any other context about the problem here.

    new issue 
    opened by devyueyue 1
Releases(0.0.82)
Owner
Jakub
Android & Flutter developer
Jakub
Munem Sarker 1 Jan 25, 2022
Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video Player plugin for Flutter A Flutter plugin for iOS, Android and Web for pl

null 2 Sep 29, 2022
Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

天海るり 179 Dec 8, 2022
A better Minecraft Launcher that supports multiple platforms and many functionalities for you to explore!

A better Minecraft Launcher that supports multiple platforms and many functionalities for you to explore!

RPMTW Team 74 Dec 14, 2022
This Dashboard was made to show one of the use cases in which Flutter web is applied.

Dashboard Flutter Web This Dashboard was made to show one of the use cases in which Flutter web is applied. Tasks Improve the splash Screen Create Log

Celestino Lopes 96 Nov 2, 2022
Reactive Programming - BLoC - Practical Use Cases and Patterns

Reactive Programming - BLoC - Practical Use Cases and Patterns Source code of the article available on didierboelens.com This article introduces some

Didier Boelens 211 Dec 29, 2022
An equation solving library written purely in Dart.

An equation solving library written purely in Dart Thanks to the equations package you will be able to solve numerical analysis problems with ease. It

Alberto 43 Dec 27, 2022
DoubtBin is a doubt solving and resources sharing portfolio.

DoubtBin is a doubt solving and resources sharing portfolio. It includes implemenation of concepts of Object Oriented Programming, Front-end Development and Back-end Development.

null 17 Oct 14, 2022
Pluggable dashboard to make PRs from multiple sources on multiple repos visible.

pr:mate Pluggable dashboard to make PRs from multiple sources on multiple repos visible. This repo is currently WIP. Further docs will follow. Develop

Tobias Brumhard 6 Oct 12, 2022
Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player First Open Source Flutter based Beautiful Material Design Music Player(Online Radio will be added soon.) Demo App Play Store BETA

Pawan Kumar 1.5k Jan 8, 2023
📱 Tracking the impact of COVID-19 cases based on your location, built in Flutter

Installation Download apk here Get on Github Releases, or Build on your own: git clone https://github.com/adityanjr/covid19-tracker.git flutter pub ge

Aditya Singh 33 Dec 26, 2022
Flutter Andriod app to track cases in each country for Corona Virus Covid-19

corova_virus_app Flutter Andriod app to track cases in each country for Corona Virus Covid-19 app support historical data/dark mode/search by country/

null 21 Mar 5, 2022
An app which shows the total number of covid cases, recovered, etc. As well as of particular country too.

covid_app Images of Project A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get

Priyam Soni 0 Oct 18, 2021
An android app to track all details about Covid-19 cases.

covid19 A Covid19 app that shows all statistics about it. It fetches the most recent data about corona virus cases from across the world and shows the

Shubham Kumar 14 Sep 20, 2021
We are building an open database of COVID-19 cases with chest X-ray or CT images.

?? Note: please do not claim diagnostic performance of a model without a clinical study! This is not a kaggle competition dataset. Please read this pa

Joseph Paul Cohen 2.9k Jan 7, 2023
A tracking app for tracking covid-19 cases around the world

?? COVID-19 Tracker A simple Flutter app to track COVID-19 cases. The data we provide is collected from World Health Organization (WHO), the US Center

Temitope Ajiboye 166 Nov 23, 2022
Flutter video player widget based on video_player

Neeko Simple video player widget based on video_player. Neek supports more actions such as timeline control, toggle fullscreen and so on. Note: This p

OpenFlutter 70 Oct 20, 2022
null 357 Dec 27, 2022
Real short video app with firebase and pixels API.Where you can create a short video with pixels' stock videos and also merge your audio.

Flutter Short Videos Platform Short videos platform with Flutter and Firebase. About Real short video app with firebase and pixels API.Where you can c

Ansh rathod 55 Dec 26, 2022