You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use of concatenatingMediaSource for playing a list of video. Some uris aren't media(video or audio) and those are uri of pdf files. I want to detect these mediasource and I change playerview to show a button to open pdf file. In fact this functionality of my application is similar to Udemy app. Should I use onPlayerError callback for detecting or exist another way? Thanks in advance for your help.
The text was updated successfully, but these errors were encountered:
We can't reliably detect whether media is playable in advance because our media sources are working under the assumption that we have a valid media file. Also, "non-playable" sources can have different forms - from totally unrelated files (like pdf) to more subtle problems like unsupported codecs or media encoding problems.
However, you can listen to errors to get an indication of that. The problem is that we don't currently mark failed media sources in a special way, so you only get the fatal onPlayerError callback in very last moment when we would actually need to start playback.
Marking as an enhancement to add such a "failed" marker to the Timeline. This allows to detect problems in advance before the playback position reaches the failed source.
Also note that ExtractorMediaSource (or ProgressiveMediaSource) doesn't prepare the media much in advance at the moment which means such a flag will not help a lot for that sources until this situation has been improved. This feature is tracked by #4727.
I can't possibly know how their app is implemented and how and if they integrate ExoPlayer. You probably have a better chance of finding that out by asking the developers of this app directly.
I use of concatenatingMediaSource for playing a list of video. Some uris aren't media(video or audio) and those are uri of pdf files. I want to detect these mediasource and I change playerview to show a button to open pdf file. In fact this functionality of my application is similar to Udemy app. Should I use onPlayerError callback for detecting or exist another way? Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: