-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and fixed BUG java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider #1085
base: master
Are you sure you want to change the base?
Conversation
…sion to 7.3.0, kotlin version to 1.7.10, exoPlayerVersion to "2.18.1"
Your fix is working here, thank u |
works like a charm, thanks! |
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.
|
I have resolved it. For future users: If you face such issue, please provide |
Yes! We should set the input video format for the player to be able to recognize what standard the video belongs to. |
Is there any solution other than upgrade the gradle, because I can't for now upgrade it |
@SamerCat |
Your fix is working here, thank u |
Great, thank you so much 🙏🏻❤ @jhomlala |
thanks! It is work ok for me. |
if (lastPathSegment == null) { | ||
lastPathSegment = "" | ||
} | ||
type = Util.inferContentType(lastPathSegment) | ||
type = Util.inferContentTypeForExtension(lastPathSegment) | ||
} else { | ||
type = when (formatHint) { | ||
FORMAT_SS -> C.TYPE_SS | ||
FORMAT_DASH -> C.TYPE_DASH | ||
FORMAT_HLS -> C.TYPE_HLS | ||
FORMAT_OTHER -> C.TYPE_OTHER | ||
FORMAT_SS -> C.CONTENT_TYPE_SS | ||
FORMAT_DASH -> C.CONTENT_TYPE_DASH | ||
FORMAT_HLS -> C.CONTENT_TYPE_HLS | ||
FORMAT_OTHER -> C.CONTENT_TYPE_OTHER | ||
else -> -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be changed to:
val type: Int = if (formatHint == null) {
Util.inferContentType(uri)
} else {
when (formatHint) {
FORMAT_SS -> C.CONTENT_TYPE_SS
FORMAT_DASH -> C.CONTENT_TYPE_DASH
FORMAT_HLS -> C.CONTENT_TYPE_HLS
FORMAT_OTHER -> C.CONTENT_TYPE_OTHER
else -> -1
}
}
Because Util.inferContentTypeForExtension(lastPathSegment)
works incorrectly for the segment, it should be the extension of file/uri (e.g. mpd or m3u8). Please, fix the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, it is for ExoPlayer 2.18.1 (Android) and above.
For future users: if this didnt work for u, stop your current debug process and restart from scratch:
|
@tintran-dev getting below error while playing .m3u8 video link on Android devices (like, Android 11, 12 & 13) Playback error @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? |
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 |
thank you solve the issue and save my time |
2.18.1
7.3.0
support jdk 11 and kotlin 1.6.+1.7.10
java.lang.NullPointerException: MediaSource.Factory#setDrmSessionManagerProvider
33
support forandroid 12+
run on gradle7.3.0