Android MediaPlayer play m3u8 only audio streamming

筅森魡賤 提交于 2019-12-04 19:26:42

To your first question, can MediaPlayer play a m3u8 file?, the answer is Yes. MediaPlayer does support the playback of MP3 playlist files.

To your next question, it is only in versions greater than 3.0 or 4.0?, we need to carefully consider the answer. Android 3.0 a.k.a. HoneyComb is not an open distribution and hence, I am not sure about the answer to your question. It may be supported, but just a guess. The playback of m3u8 files is supported from Android 4.0 / ICS onwards. Please find the link to the source, where the player is created for m3u8 file as http://androidxref.com/4.0.4/xref/frameworks/base/media/libmediaplayerservice/MediaPlayerService.cpp#583

If you are getting an error as error(1, -1010), it means somewhere in your player, the engine is returning with a ERROR_UNSUPPORTED return code. For reference, you could look into the sources here.

You would have to debug further and localize the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!