betterplayer
betterplayer copied to clipboard
Update and fixed BUG java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
- Update exoplayer version to
2.18.1
- Update gradle version
7.3.0
support jdk 11 and kotlin 1.6.+ - Update kotlin version to
1.7.10
- Fixed error
java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
- Upgrade compilesdkversion to
33
support forandroid 12+
run on gradle7.3.0
- To use:
better_player:
git:
url: https://github.com/tintran-dev/betterplayer.git
Your fix is working here, thank u
works like a charm, thanks! we need to merge that into master
I just came around to this bug and used the git version of the package and when I try to play the video it throws this error. It was working fine before I updated it.
Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (FlvExtractor, FlacExtractor, WavExtractor, FragmentedMp4Extractor, Mp4Extractor, AmrExtractor, PsExtractor, OggExtractor, TsExtractor, MatroskaExtractor, AdtsExtractor, Ac3Extractor, Ac4Extractor, Mp3Extractor, AviExtractor, JpegExtractor) could read the stream.
I have resolved it.
For future users:
If you face such issue, please provide videoFormat: BetterPlayerVideoFormat.hls,
since in my case the video URL was
https://streaming_server/path/to/video_,24,36,48,72,108,0p.mp4.urlset/master.m3u8
I have resolved it.
For future users:
If you face such issue, please provide
videoFormat: BetterPlayerVideoFormat.hls,
since in my case the video URL washttps://streaming_server/path/to/video_,24,36,48,72,108,0p.mp4.urlset/master.m3u8
Yes! We should set the input video format for the player to be able to recognize what standard the video belongs to.
EX:
.m3u8
is videoFormat: BetterPlayerVideoFormat.hls
.mpd
is videoFormat: BetterPlayerVideoFormat.dash
other set null
Is there any solution other than upgrade the gradle, because I can't for now upgrade it
@SamerCat
You can clone source: https://github.com/tintran-dev/betterplayer.git to use local package in this your PC and then you can android studio to open folder android in package, edit gradle version back to 7.0.2 in file android/build.gradle
: ext.gradleVersion = "7.0.2"
Your fix is working here, thank u
@jhomlala This pr fixes #1116 and #1113. Please merge.
Great, thank you so much 🙏🏻❤
@jhomlala Kindly review and merge this one ... 🙏🏻
- Update exoplayer version to
2.18.1
- Update gradle version
7.3.0
support jdk 11 and kotlin 1.6.+- Update kotlin version to
1.7.10
- Fixed error
java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
- Upgrade compilesdkversion to
33
support forandroid 12+
run on gradle7.3.0
- To use:
better_player:
git:
url: https://github.com/tintran-dev/betterplayer.git
thanks! It is work ok for me.
For future users: if this didnt work for u, stop your current debug process and restart from scratch:
- run
flutter clean
- then run
flutter run
- Update exoplayer version to
2.18.1
- Update gradle version
7.3.0
support jdk 11 and kotlin 1.6.+- Update kotlin version to
1.7.10
- Fixed error
java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
- Upgrade compilesdkversion to
33
support forandroid 12+
run on gradle7.3.0
- To use:
better_player:
git:
url: https://github.com/tintran-dev/betterplayer.git
@tintran-dev getting below error while playing .m3u8 video link on Android devices (like, Android 11, 12 & 13) (URL => https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8)
Playback error com.google.android.exoplayer2.ExoPlaybackException: Source error Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (FlvExtractor, FlacExtractor, WavExtractor, FragmentedMp4Extractor, Mp4Extractor, AmrExtractor, PsExtractor, OggExtractor, TsExtractor, MatroskaExtractor, AdtsExtractor, Ac3Extractor, Ac4Extractor, Mp3Extractor, AviExtractor, JpegExtractor) could read the stream. Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: Source error, , null)
@tintran-dev help us to solve this.
For your information, this issue is still on-going. The fix by @tintran-dev worked. But this must be fixed by @jhomlala at some point please !?
@tintran-dev it is not picking proper hls track for audio after update
I have merged this alongside more updates to this fork which you can use for now
better_player:
git:
url: 'https://github.com/guyluz11/betterplayer.git'
ref: 'merge_fixes'
@guyluz11 Thank you sir you saved me 🫡
Is there any reason why this hasn't been merged yet?
Is there any reason why this hasn't been merged yet?
Because the repo owner is not responding anymore. I have been using titran's fork ever since without issues.
Hey @tintran-dev thanks for your fixes, I'm having issues integrating your changes with my project having flutter 2.1.13, is there a way to implement your changes without having to change my flutter version to 3.1.0 please?
I can not upgrade flutter because many packages depend on flutter 2.1.13. Thanks in advance.
Good forks are everywhere. If the plugin owner doesn't respond anymore, I suggest publishing it as a new pub.dev
package using a new name e.g. best_player
.
- Update exoplayer version to
2.18.1
- Update gradle version
7.3.0
support jdk 11 and kotlin 1.6.+- Update kotlin version to
1.7.10
- Fixed error
java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
- Upgrade compilesdkversion to
33
support forandroid 12+
run on gradle7.3.0
- To use:
better_player:
git:
url: https://github.com/tintran-dev/betterplayer.git
thank you solve the issue and save my time