GithubHelp home page GithubHelp logo

jhomlala / betterplayer Goto Github PK

View Code? Open in Web Editor NEW
870.0 22.0 885.0 47.33 MB

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

License: Apache License 2.0

Kotlin 11.79% Swift 3.23% Objective-C 9.32% Dart 75.33% Ruby 0.34%
dart player flutter flutter-package flutter-plugin dart-library dartlang android ios hacktoberfest

betterplayer's Introduction

Hi ๐Ÿ‘‹, I'm Jakub

  • ๐Ÿ”ญ Iโ€™m currently working on open source projects: BetterPlayer, Catcher, Alice
  • ๐Ÿข I'm working @ Better Software Group
  • ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available at https://github.com/jhomlala
  • ๐Ÿ’ฌ Ask me about Flutter, Android, Dart, Kotlin
  • โšก Fun fact I like to refactor old code.

ย jhomlala

Connect with me:

jhomlala @jhomlala

jhomlala

betterplayer's People

Contributors

big7lion avatar bounty1342 avatar chopindavid avatar espresso3389 avatar felipefernandesleandro avatar fluttersu avatar ganeshrvel avatar gazialankus avatar jarvanmo avatar jhomlala avatar jhomlalabsg avatar junxien avatar maine98 avatar marcusforsberg avatar mohamed-etman avatar mtalves avatar nicholascioli avatar njlawton avatar r6c avatar shashikantdurge avatar smurat avatar sokolovstas avatar thanhvn-57 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

betterplayer's Issues

Not showing buffering or loading.

It is not showing buffering When I slide the progress bar to random places till the video starts playing again.

How to do it. Did I miss something?

Loading indicator keeps showing

When BetterPlayerConfiguration(autoPlay: true) is enabled, after finishing the loading to another video the loading indicator keeps showing even after next video is loaded and playing.

how to catch event?

 eventListener: (event) {
                          if (event.betterPlayerEventType ==
                              'BetterPlayerEventType.OPEN_FULLSCREEN') {}
                          if (event.betterPlayerEventType ==
                              BetterPlayerEventType.OPEN_FULLSCREEN){}
                           
                        },

both of them give some errors

info: Equality operator == invocation with references of unrelated types.
error: Undefined name 'BetterPlayerEventType'.

Keep playing video on screen lock

Hi, I need to keep the media playing when user locks the screen.
not getting expected behavior on changing this config

          allowedScreenSleep: false

Placeholder does not respect fit rules

When using a BetterPlayerListVideoPlayer with a fit of BoxFit.fitWidth and a placeholder of an image with the same dimensions as the video (in this case, with an aspect ratio of < 1 [so taller rather than wider]), the placeholder appears to be left aligned and not fit to the width of the view.

VideoController is disposed on list scroll

I get 'A VideoPlayerController was used after being disposed. Once you have called dispose() on a VideoPlayerController, it can no longer be used'.

I have a bunch of videos inside a list, my list is actually not only made up of videos but other text data. Its a list of posts, some posts are videos some are not. I have a code that checks if the current item in the viewport is a video while scrolling, then i auto play the video. the above error is thrown when i scroll past a video and then scroll back to that video to play it again.

I don't have anything in my dispose method.

Seek a BetterPlayerListVideoPlayer

As it stands, the BetterPlayerListVideoPlayerController is missing feature parity with the underlying BetterPlayerController.

Maybe add a way to expose the underlying controller? Something like:

// Somewhere in better_player_list_video_player_controller.dart
BetterPlayerController get controller => _betterPlayerController;
BetterPlayerController set controller(BetterPlayerController c) => _betterPlayerController = c;

I can make a pull request, if that would be easier.

Package name is easy to have conflict

The package com.jhomlala.better_player.VideoPlayerPlugin will conflict with another plugin such as video_trimmer.
As there is a plugin VideoPlayer (io.flutter.plugins.videoplayer.VideoPlayerPlugin) use the same name VideoPlayerPlugin.

I suggest to rename it to prevent conflict probability .

How to stop playing when the ListView is on background

BetterPlayer is very good!

I'd like to know how to stop playing when the ListView is on background,
for example, I push a new Navigator.push() on the ListView page, but some video still playing and its sound still playing.
Is there any way to stop playing it in that case?

IOS - App crash on dispose - Cannot remove an observer <FLTVideoPlayer>

While play the video and navigating back app crash with the following exception:
Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <FLTVideoPlayer 0x28351db00> for the key path "status" from <AVPlayerItem 0x28193fea0> because it is not registered as an observer.'

Also example project does the same navigating between taps (general/playlist..) or navigating back.
Tried on both flutter 1.17.3 and 1.12.13, both on device and simulator
Can anyone confirm if this plugin working on ios fine with him?
any clues?

Feature request: rotate video playback

As user I would love to be able to set rotation of the video during playback. I cannot rotate the BetterPlayer widget itself as it's also rotating the controls.

HTTP support

Sorry for my english, I am using a translator...

Hi! Thank you for liblary!
How can I enable support for the HTTP protocol? I need support video for http request.
Example:
http: //example.com/video.mp4

Feature Request: AirPlay & Chromecast Support

What A great addition to the Flutter Community!
Really love the ease of use of betterpayer, and how functional it is within our app! Well Done guys.

I think a big thing here, is that we would like to be a able to take the video's that are currently playing in the app and "cast" them to a bigger screen.

there is a current flutter repository working on this (Terrabythia Github Link)

Would love to see this integrated within the betterplayer app (perhaps the screen selection could be in the same place as the new video speed section)

And then Airplay support would be awesome as well for iOS devices (Although I have not seen a project that has done this yet)

When there is no internet or internet connection fluctuates - app crashes

Hi - on the surface this is a great plugin but has major flaws with respect to handling offline mode - The plugin doesnt fully support when the device is offline or transitions between on-offline-on etc :

Issue 1

Add the plugin and open a screen which auto plays the video. Assuming that the device is online, the video plays. Now quickly turn your device to offline. After a while (depends on how much is buffered) - you will see the circular progress bar. Now close the view and then go back in. the app will crash.

This is on iOS.

Issue 2

When there is no internet and we try and load betterPlayer - we see a message :

'Video Cannot be Played'

After a while we get a crash :

PlatformException(VideoError, Failed to load video: The Internet connection appears to be offline., null)
flutter: Error caught by Crashlytics plugin <recordError>:
flutter: RangeError (index): Invalid value: Only valid value is 0: 1

It makes no difference if we define an ErrorBuilder - nothing is shown with code in our ErrorBuilder.

We tried this on iOS.

Error on IOS

I get this error on IOS when i try to play video from external API.

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (100), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x282703ea0 {Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error"}}
flutter: Caught error: PlatformException(VideoError, Failed to load video: The operation could not be completed, null, null)

How to get full video duration

Hi, i'm using this package in a project that i need to redesign the controls based on UI so i have decided to do it manually and the problem is that i don't know how can i show the full video duration at the start, is there anyway to do this ?
Thanks

Player not working

This is my code for the widget :


import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:better_player/better_player.dart';

class BetterPlayerWidget extends StatefulWidget {
  final String videoUrl;
  Function videoPlayerValue;
  final timePassed;

  BetterPlayerWidget(this.videoUrl, {this.videoPlayerValue, this.timePassed});

  @override
  State<StatefulWidget> createState() {
    return BetterPlayerWidgetState();
  }
}

class BetterPlayerWidgetState extends State<BetterPlayerWidget> {
  BetterPlayerController _betterPlayerController;

  final double playerWidth = 640;
  final double playerHeight = 360;


  @override
  void initState() {
    super.initState();
    BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(
        BetterPlayerDataSourceType.NETWORK,
         "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4");
    _betterPlayerController = BetterPlayerController(
        BetterPlayerConfiguration(),
        betterPlayerDataSource: betterPlayerDataSource);
  }

  Widget build(BuildContext context) {
        Size size = MediaQuery.of(context).size;
    double width = size.width;
    return Container(
        height: 300,
        width: width,
           child: BetterPlayer(
        controller: _betterPlayerController,
        ));
  }

  @override
  void dispose() {
    super.dispose();
  }
}

This is the error :

Init e03093e [ExoPlayerLib/2.11.1] [lavender, Redmi Note 7, Xiaomi, 28]
E/MethodChannel#flutter.io/videoPlayer( 7379): Failed to handle method call
E/MethodChannel#flutter.io/videoPlayer( 7379): java.lang.NullPointerException: uriString
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.net.Uri$StringUri.<init>(Uri.java:490)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.net.Uri$StringUri.<init>(Uri.java:480)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.net.Uri.parse(Uri.java:452)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at io.flutter.plugins.videoplayer.VideoPlayer.<init>(VideoPlayer.java:73)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at io.flutter.plugins.videoplayer.VideoPlayerPlugin.onMethodCall(VideoPlayerPlugin.java:133)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.os.Looper.loop(Looper.java:165)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at android.app.ActivityThread.main(ActivityThread.java:6810)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/MethodChannel#flutter.io/videoPlayer( 7379): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/flutter ( 7379): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(error, uriString, null)
E/flutter ( 7379): #0      StandardMethodCodec.decodeEnvelope 
package:flutter/โ€ฆ/services/message_codecs.dart:569
E/flutter ( 7379): #1      MethodChannel._invokeMethod 
package:flutter/โ€ฆ/services/platform_channel.dart:156
E/flutter ( 7379): <asynchronous suspension>
E/flutter ( 7379): #2      MethodChannel.invokeMethod 
package:flutter/โ€ฆ/services/platform_channel.dart:329
E/flutter ( 7379): #3      MethodChannel.invokeMapMethod 
package:flutter/โ€ฆ/services/platform_channel.dart:356
E/flutter ( 7379): #4      MethodChannelVideoPlayer.create 
package:better_player/โ€ฆ/video_player/method_channel_video_player.dart:33
E/flutter ( 7379): #5      VideoPlayerController._create 
package:better_player/โ€ฆ/video_player/video_player.dart:188
E/flutter ( 7379): #6      new VideoPlayerController 
package:better_player/โ€ฆ/video_player/video_player.dart:164
E/flutter ( 7379): #7      BetterPlayerController._setup 
package:better_player/โ€ฆ/core/better_player_controller.dart:101
E/flutter ( 7379): #8      new BetterPlayerController 
package:better_player/โ€ฆ/core/better_player_controller.dart:81
E/flutter ( 7379): #9      BetterPlayerWidgetState.initState 
package:wane/โ€ฆ/video_player/betterPlayer.dart:31
E/flutter ( 7379): #10     StatefulElement._firstBuild 
package:flutter/โ€ฆ/widgets/framework.dart:4649
E/flutter ( 7379): #11     ComponentElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:4485
E/flutter ( 7379): #12     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #13     Element.updateChild 
package:flutter/โ€ฆ/widgets/framework.dart:3223
E/flutter ( 7379): #14     SingleChildRenderObjectElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:5839
E/flutter ( 7379): #15     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #16     Element.updateChild 
package:flutter/โ€ฆ/widgets/framework.dart:3223
E/flutter ( 7379): #17     ComponentElement.performRebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4536
E/flutter ( 7379): #18     Element.rebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4227
E/flutter ( 7379): #19     ComponentElement._firstBuild 
package:flutter/โ€ฆ/widgets/framework.dart:4490
E/flutter ( 7379): #20     ComponentElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:4485
E/flutter ( 7379): #21     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #22     MultiChildRenderObjectElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:5956
E/flutter ( 7379): #23     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #24     Element.updateChild 
package:flutter/โ€ฆ/widgets/framework.dart:3223
E/flutter ( 7379): #25     ComponentElement.performRebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4536
E/flutter ( 7379): #26     Element.rebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4227
E/flutter ( 7379): #27     ComponentElement._firstBuild 
package:flutter/โ€ฆ/widgets/framework.dart:4490
E/flutter ( 7379): #28     ComponentElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:4485
E/flutter ( 7379): #29     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #30     Element.updateChild 
package:flutter/โ€ฆ/widgets/framework.dart:3223
E/flutter ( 7379): #31     ComponentElement.performRebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4536
E/flutter ( 7379): #32     Element.rebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4227
E/flutter ( 7379): #33     ComponentElement._firstBuild 
package:flutter/โ€ฆ/widgets/framework.dart:4490
E/flutter ( 7379): #34     ComponentElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:4485
E/flutter ( 7379): #35     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #36     Element.updateChild 
package:flutter/โ€ฆ/widgets/framework.dart:3223
E/flutter ( 7379): #37     ComponentElement.performRebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4536
E/flutter ( 7379): #38     Element.rebuild 
package:flutter/โ€ฆ/widgets/framework.dart:4227
E/flutter ( 7379): #39     ComponentElement._firstBuild 
package:flutter/โ€ฆ/widgets/framework.dart:4490
E/flutter ( 7379): #40     ComponentElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:4485
E/flutter ( 7379): #41     Element.inflateWidget 
package:flutter/โ€ฆ/widgets/framework.dart:3455
E/flutter ( 7379): #42     MultiChildRenderObjectElement.mount 
package:flutter/โ€ฆ/widgets/framework.dart:5956
E/flutter ( 7379): #43     Element.inflateWidget 

iOS: Failed to load video: Operation Stopped

Hello. I've been testing this package and on android it works great. In iOS I have the same problem as with the rest. When trying to read a streaming (IPTV) it gives the following error in console:

flutter: PlatformException(VideoError, Failed to load video: Operation Stopped, null)
flutter: #0 BetterPlayerController._initialize (package:better_player/src/core/better_player_controller.dart:132:9)

#1 BetterPlayerController._setup (package:better_player/src/core/better_player_controller.dart:111:11)
#2 new BetterPlayerController (package:better_player/src/core/better_player_controller.dart:20:7)
#3 _PlayerState.initState (package:iptv/player.dart:27:31)
#4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
#5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#7 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)

I appreciate you can help me.

Regards!

error when load video from youtube or stream

W/_player_exampl(15920): Throwing OutOfMemoryError "Failed to allocate a 65552 byte allocation with 29416 free bytes and 28KB until OOM, target footprint 16777216, growth limit 16777216" (VmSize 4154940 kB)
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 23(32KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 282us total 7.781ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 25(32KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 629us total 6.495ms
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 8.078ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 8.165ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 6.581ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 6.245ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 26(32KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 359us total 5.477ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 8.800ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 14.202ms
I/_player_exampl(15920): Starting a blocking GC Alloc
E/LoadTask(15920): OutOfMemory error loading stream
E/LoadTask(15920): java.lang.OutOfMemoryError: Failed to allocate a 65552 byte allocation with 29416 free bytes and 28KB until OOM, target footprint 16777216, growth limit 16777216
E/LoadTask(15920): at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:102)
E/LoadTask(15920): at com.google.android.exoplayer2.source.SampleQueue.preAppend(SampleQueue.java:633)
E/LoadTask(15920): at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:553)
E/LoadTask(15920): at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:533)
E/LoadTask(15920): at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:187)
E/LoadTask(15920): at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:898)
E/LoadTask(15920): at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
E/LoadTask(15920): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/LoadTask(15920): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/LoadTask(15920): at java.lang.Thread.run(Thread.java:919)
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 9.634ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 2213(84KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 307us total 48.926ms
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 41.803ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 1149(58KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 4.468ms total 13.971ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 14.374ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 1096(47KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 3.945ms total 11.773ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 72.879ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 1489(68KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 291us total 19.786ms
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 10.466ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 9.429ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Alloc young concurrent copying GC freed 1801(62KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 273us total 39.859ms
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 19.028ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 11.429ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Alloc young concurrent copying GC freed 923(47KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 813us total 11.146ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 31.949ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Alloc young concurrent copying GC freed 114(9808B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 636us total 9.270ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 31(1760B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 626us total 8.605ms
I/_player_exampl(15920): Forcing collection of SoftReferences for 64KB allocation
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 1121(44KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 1.059ms total 11.437ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 11(272B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 270us total 8.084ms
I/_player_exampl(15920): Forcing collection of SoftReferences for 64KB allocation
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 10(304B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 769us total 5.125ms
W/_player_exampl(15920): Throwing OutOfMemoryError "Failed to allocate a 65548 byte allocation with 29400 free bytes and 28KB until OOM, target footprint 16777216, growth limit 16777216" (VmSize 4162012 kB)
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 37.413ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 4(80B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 2.357ms total 17.695ms
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 17.543ms
I/_player_exampl(15920): Forcing collection of SoftReferences for 64KB allocation
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 8.524ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 5(136B) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 286us total 6.576ms
W/_player_exampl(15920): Throwing OutOfMemoryError "Failed to allocate a 65552 byte allocation with 29328 free bytes and 28KB until OOM, target footprint 16777216, growth limit 16777216" (VmSize 4162012 kB)
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Alloc young concurrent copying GC freed 22(24KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 283us total 6.364ms
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 21.195ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 8.882ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 9.189ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 14.534ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): WaitForGcToComplete blocked Alloc on HeapTrim for 5.617ms
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Waiting for a blocking GC Alloc
I/_player_exampl(15920): Starting a blocking GC Alloc
I/chatty (15920): uid=10134(com.jhomlala.better_player_example) Loader:Extracto identical 1 line
I/_player_exampl(15920): Starting a blocking GC Alloc
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB
I/_player_exampl(15920): Alloc concurrent copying GC freed 33(32KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 15MB/16MB, paused 281us total 12.459ms
I/_player_exampl(15920): WaitForGcToComplete blocked Background on HeapTrim for 9.573ms
E/LoadTask(15920): OutOfMemory error loading stream
E/LoadTask(15920): java.lang.OutOfMemoryError: Failed to allocate a 65552 byte allocation with 29328 free bytes and 28KB until OOM, target footprint 16777216, growth limit 16777216
E/LoadTask(15920): at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:102)
E/LoadTask(15920): at com.google.android.exoplayer2.source.SampleQueue.preAppend(SampleQueue.java:633)
E/LoadTask(15920): at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:553)
E/LoadTask(15920): at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:533)
E/LoadTask(15920): at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:187)
E/LoadTask(15920): at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:898)
E/LoadTask(15920): at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
E/LoadTask(15920): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/LoadTask(15920): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/LoadTask(15920): at java.lang.Thread.run(Thread.java:919)
I/_player_exampl(15920): Clamp target GC heap from 21MB to 16MB

fullScreenByDefault not working

Hii

I need to open the video in fullscreen mode by default. I have given "fullScreenByDefault : true" in BetterPlayerConfiguration but I get only the portrait mode first and then the landscape mode. Can you please help solving this.

Video Quality

Hi, thanks for the great library.

Just wondering how can I show different qualities in quality option for non hls videos and use them to change video quality?

subtitle font color

if subtitle contains text with color tag, for example EPISODE1. it keep shows EPISODE1 not EPISODE1 with yellow text.

Duplicate plugin key

Hey there, im developing a flutter app using your plugin. In android it works just fine but on IOS I get the following:

image

Iยดve been digging for a while and I believe its some kind of conflict with the class naming of the https://pub.dev/packages/video_player since they have both the same name.

Samsung S6 - Exoplayer2 error

Hello,

Sometimes I got this issue on my Samsung S6 device. Is it possible to improve somehow? if this error occurs, he receives the message "Video can't be played". The video file is not damaged, because e.g. restarting the application easily launches this video file. I also noticed that the problem appears when I run several movies one by one.

I/OMXClient(27887): MuxOMX ctor
I/ACodec (27887): [OMX.Exynos.avc.dec] Now Loaded
D/SurfaceUtils(27887): set up nativeWindow 0x7438ad0e10 for 1080x1920, color 0x105, rotation 0, usage 0x2900
I/ACodec (27887): [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 9, minUndequeuedBuffers : 5
I/ACodec (27887): [OMX.Exynos.avc.dec] Now uninitialized
I/ACodec (27887): [] Now kWhatShutdownCompleted event : 8438
I/MediaCodec(27887): Codec shutdown complete
W/MediaCodecRenderer(27887): Failed to initialize decoder: OMX.Exynos.avc.dec
W/MediaCodecRenderer(27887): android.media.MediaCodec$CodecException: Error 0xffffec77
W/MediaCodecRenderer(27887): at android.media.MediaCodec.native_configure(Native Method)
W/MediaCodecRenderer(27887): at android.media.MediaCodec.configure(MediaCodec.java:1882)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec(MediaCodecVideoRenderer.java:483)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:805)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:529)
W/MediaCodecRenderer(27887): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300)
W/MediaCodecRenderer(27887): at android.os.Handler.dispatchMessage(Handler.java:98)
W/MediaCodecRenderer(27887): at android.os.Looper.loop(Looper.java:154)
W/MediaCodecRenderer(27887): at android.os.HandlerThread.run(HandlerThread.java:61)
E/ExoPlayerImplInternal(27887): Playback error.
E/ExoPlayerImplInternal(27887): com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, null, video/avc, null, -1, null, [1080, 1920, -1.0], [-1, -1])
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:529)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300)
E/ExoPlayerImplInternal(27887): at android.os.Handler.dispatchMessage(Handler.java:98)
E/ExoPlayerImplInternal(27887): at android.os.Looper.loop(Looper.java:154)
E/ExoPlayerImplInternal(27887): at android.os.HandlerThread.run(HandlerThread.java:61)
E/ExoPlayerImplInternal(27887): Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, null, video/avc, null, -1, null, [1080, 1920, -1.0], [-1, -1])
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:753)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
E/ExoPlayerImplInternal(27887): ... 9 more
E/ExoPlayerImplInternal(27887): Caused by: android.media.MediaCodec$CodecException: Error 0xffffec77
E/ExoPlayerImplInternal(27887): at android.media.MediaCodec.native_configure(Native Method)
E/ExoPlayerImplInternal(27887): at android.media.MediaCodec.configure(MediaCodec.java:1882)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec(MediaCodecVideoRenderer.java:483)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:805)
E/ExoPlayerImplInternal(27887): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
E/ExoPlayerImplInternal(27887): ... 10 more
D/SurfaceUtils(27887): set up nativeWindow 0x743b2e0e10 for 1080x1920, color 0x105, rotation

Tap to play on complete player screen

Hi,

This player is almost perfect. Just found one issue that player does have a tap to play feature but tap area is available only for 75% of player screen, can you please make it available for complete player screen.

Thank you.

VideoPlayerController was used after being disposed

Hello,

In the example attached to the library, I increased the number of films to 100 on the list.builder. after rewinding the first dozen or so films, an error is displayed.

"A VideoPlayerController was used after being disposed. One you have called dispose() on a VideoPlayerController, it can no longer be used"

can you fix this problem?

betterplayer live stream .m3u8 not working on ios

My code is identical like betterplayer example code, I only did the following:
1- Put liveStream: true.
2- Change the given URL to a live online .m3u8 stream.

My code:

Future<BetterPlayerController> _setupDefaultVideoData() async {
  var dataSource = BetterPlayerDataSource(
      BetterPlayerDataSourceType.NETWORK,
      "https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8",
      liveStream: true);
  _betterPlayerController = BetterPlayerController(
      BetterPlayerConfiguration(
        autoPlay: true,
        controlsConfiguration:
        BetterPlayerControlsConfiguration(
            enableProgressText: true),
      ),
      betterPlayerDataSource: dataSource);
  return _betterPlayerController;
}

Note: I used the same code for android and the app was working, even I uploaded it to play store and it is working fine, But when I tried the IOS version the video on demand (VOD) was also working BUT I faced the following error only with the live stream

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by gesture โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

The following NoSuchMethodError was thrown while handling a gesture:
The getter '_duration' was called on null.
Receiver: null
Tried calling: _duration

When the exception was thrown, this was the stack:

#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 Duration.>= (dart:core/duration.dart:175:63)
#2 _BetterPlayerCupertinoControlsState._playPause (package:better_player/src/controls/better_player_cupertino_controls.dart:532:45)
#3 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:504:11)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#22cb7
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(22.0, 309.5)
finalLocalPosition: Offset(9.0, 25.6)
button: 1
sent tap down
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

My flutter doctor -v was:

Macs-MacBook-Pro:betterplayer-master mac$ flutter doctor -v

[โœ“] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-US)

โ€ข Flutter version 1.17.1 at /Users/mac/development/flutter

โ€ข Framework revision f7a6a7906b (4 weeks ago), 2020-05-12 18:39:00 -0700

โ€ข Engine revision 6bc433c6b6

โ€ข Dart version 2.8.2

[โœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.3)

โ€ข Android SDK at /Users/mac/Library/Android/sdk

โ€ข Platform android-29, build-tools 29.0.3

โ€ข Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java

โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

โ€ข All Android licenses accepted.

[โœ“] Xcode - develop for iOS and macOS (Xcode 11.5)

โ€ข Xcode at /Applications/Xcode.app/Contents/Developer

โ€ข Xcode 11.5, Build version 11E608c

โ€ข CocoaPods version 1.9.1

[โœ“] Android Studio (version 3.6)

โ€ข Android Studio at /Applications/Android Studio.app/Contents

โ€ข Flutter plugin version 45.1.1

โ€ข Dart plugin version 192.8052

โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[โœ“] Connected device (1 available)

โ€ข iPhone SE (2nd generation) โ€ข 2D3BE9D0-C5DF-44A6-90EE-818D8D1383D9 โ€ข ios โ€ข com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

โ€ข No issues found!

Macs-MacBook-Pro:betterplayer-master mac$

When Entering Full Screen New Instance of video starts

Hi, I really Love better player, and you rock !!! it's my favorite Video Player I am working on a project now and I ran into some issue when I am playing hls, in a page where I have a playlist like youtube and I choose different videos, when I click on another video it loads another video better than any Player out there but there is 1 problem when I click to open fullscreen it opens a new instance of the player and it shows full screen but the same video starts again and I can hear the voices still in the background I have been struggling with this for a while, I have even created my own controls and used custom_controls feature to see my controls because I am trying to bypass that 2 instances issue thing but I am very new to flutter and I am still learning it might be I have done something wrong, please have a look at it and let me know when going full screen and back you get more then 1 instance if yes can you please fix it? thank you so much for the great work

Private video Authorization header

I need to play video from a URL which is private and required Authorization token to be sent in its header. Is there a possibility we can send the Auth token to play video?

AspectRatio

How can I get AspectRadio of video using BetterPlayerListVideoPlayer? it is not possible to set the controller here. In the application I have many movies in various aspects ratios. Any ideas?

AspectRatio of source video

Hey, great plugin! No doubt.
Is there a way to get the Aspect Ratio of video from URL so that I can assign it? Or, is it possible for Player to assign Ratio to itself from the video source automatically so that we don't have to assign manually. Of course, there should be override option in case someone needs it. Problem is, we would never know what ratio video the customer will upload. The player should be able to handle the ratio from the source and display video perfectly by default. This would be very convenient for us as a developer.

The Chewie players lets you do that by:

_videoPlayerController = VideoPlayerController.network("widget.videoUrl");
await _videoPlayerController.initialize();
_chewieController = ChewieController( aspectRatio: _videoPlayerController.value.aspectRatio,);

With this, we don't have to define Aspect ratio for every video on the widget and all ratio videos render as they are without stretching.

Enhancement to make this best - IMA ads

Can you add IMA ads to this plugin so that we can show skippable video ads before the player starts playing videos.

No other player has this feature and supporting ads could make this plugin stand apart and help many developers.

How to show subtitle from HLS video ?

Hi, thanks for this great plugin, can you guide me how to show and set subtitle in HLS video ?
in m3u8 file, there's a subtitle options.

thank you

Video Player in Potrait Full screen

Hi,
How can i make potrait fullscreen video player, i have a videos which are potrait supported resolution and i wanted to play them in potrait mode . Can you help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.