我正在尝试播放离线下载的HLS。因此,当前我有一个包含所有“ xxx.v3.exo”块的目录,并且我遵循了此guide,但是我遇到了抛出此异常的情况:
com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:820)
at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:742)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
我不为什么这么说,因为我已经正确设置了所有渲染器,所以有什么主意吗?预先感谢。
答案 0 :(得分:0)
您是否正在使用MediaSource buildMediaSource函数?
simpleExoPlayerView.setPlayer(player);
MediaSource mediaSource = buildMediaSource(Uri.parse(url));
loopingSource = new LoopingMediaSource(mediaSource);
player.prepare(loopingSource);
private MediaSource buildMediaSource(Uri uri) {
.....
}