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
  • 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 1
  •  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
  • Change subtitle font Color and background after the player is initialised

    Change subtitle font Color and background after the player is initialised

    Hi,

    I would like to provide configuration options for people to modify subtitles font color and back ground while they are watching a video.

    Is this possible ?

    Regards, Ameya

    new issue 
    opened by ameya730 0
Releases(0.0.82)
Owner
Jakub
Android & Flutter developer
Jakub
This is a flutter package of video player. it's a very simple and easy to use.

This is a flutter package of video player. it's a very simple and easy to use.

初冬 184 Nov 18, 2022
Flutter Music Player - A complete and open source music player designed in flutter.

Flutter Music Player A complete and open source music player designed in flutter. It is first complete music player designed in flutter. This app expl

Nabraj Khadka 3 Aug 20, 2022
Flutter-Music-Player - A simple music player app that let you play mp3 songs with some customization feature with a rich user interface

Flutter-Music-Player - A simple music player app that let you play mp3 songs with some customization feature with a rich user interface

Ashirbad Swain 6 Jan 4, 2023
The video player for Flutter with a heart of gold

chewie The video player for Flutter with a heart of gold. The video_player plugin provides low-level access to video playback. Chewie uses the video_p

Brian Egan 1.6k Jan 7, 2023
Advanced video player based on video_player and Chewie for flutter

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

Ahmed Mahmoud 1 Dec 22, 2021
Flutter plugin for use Video.js in flutter web

Flutter Video.js player Flutter plugin for use Video.js in flutter web Installation Add it to your package's pubspec.yaml file dependencies: video_j

null 15 Oct 17, 2022
Flutter plugin for selecting multiple images from the Android and iOS image library

Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.

Weta Vietnam 91 Dec 19, 2022
Audio player app in Flutter. Created as a tutorial for learning Flutter.

Music Player: create a simple Flutter music player app This is a Flutter project used during a series of articles on I should go to sleep. License Cop

Michele Volpato 11 May 5, 2022
Flutter radio player mod flutter 2.5

A Flutter plugin to play streaming audio content with background support and lock screen controls.

Ayotunde abdulsalam 1 Mar 14, 2022
Flutter plugin for sound. Audio recorder and player.

Flutter Sound user: your documentation is there The CHANGELOG file is here Overview Flutter Sound is a Flutter package allowing you to play and record

null 764 Jan 2, 2023
BlackHole - A Music Player App made with Flutter

BlackHole - A Music Player App made with Flutter

Ankit Sangwan 4.2k Jan 2, 2023
ZY Player TV app, developed with Flutter

ZY-Player-TV ZY Player TV app, developed with Flutter 1. 设置Flutter环境 1.1 按着https://flutter.dev/docs/get-started/install/windows 页面的指导,先安装好Flutter和Andr

null 165 Dec 23, 2022
Enjoy podcasts with Tsacdop! A podcast player built with flutter.

About Enjoy podcasts with Tsacdop. Tsacdop is a podcast player developed with Flutter, a clean, simply beautiful and friendly app, which is also free

stonegate 339 Dec 31, 2022
A Material designed music player developed in Flutter.

Flutter Music Player UI A Material designed music player developed in Flutter. Getting Started This project is a starting point for a Flutter applicat

Packiyanathan Mathulan 17 Jan 13, 2022
Flutter plugin for sound. Audio recorder and player.

Sounds Sounds is a Flutter package allowing you to play and record audio for both the android and ios platforms. Sounds provides both a high level API

Brett Sutton 75 Dec 8, 2022
Flutter music player application. (仿网易云音乐)

Flutter music player application. (仿网易云音乐)

Bin 3.1k Dec 30, 2022
A Flutter music player to play songs (mp3).

?? ?? Flutter Music A Flutter music player to play songs (mp3). Please star ⭐ the repo if you like what you see ?? . ?? Requirements Any Operating Sys

null 109 Dec 16, 2022
A simple music player made using Flutter.

Music Player App This is a beautiful music player, developed using Flutter. Features Play any song included in Flutter Assets Background Play Beautifu

Hash Studios 15 May 21, 2022
A flutter based music player for subsonic compatible music servers.

subsound A subsonic music player. Screenshots Release todo fix random breakage of player sometimes. seems like onStart is not working after background

Eivind Siqveland Larsen 26 Oct 6, 2022