We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
感谢作者的分享和无私的奉献帮我解决BUG
问题描述:在大于8个小时的单视频循环播放会出现音频不同步问题 解决办法 :(1)这个是ExoPlayer的bug 设置FLAG_WORKAROUND_IGNORE_EDIT_LISTS可解决bug 参考:google/ExoPlayer#4559 (2)作者更新了代码 需要继承MediaSourceBuilder重写initMediaSource方法 代码如下: @OverRide public MediaSource initMediaSource(Uri uri) { DefaultExtractorsFactory mDefaultExtractorsFactory= new DefaultExtractorsFactory(); mDefaultExtractorsFactory.setMp4ExtractorFlags(Mp4Extractor.FLAG_WORKAROUND_IGNORE_EDIT_LISTS); int streamType = VideoPlayUtils.inferContentType(uri); switch (streamType) { case C.TYPE_OTHER: return new ExtractorMediaSource.Factory(getDataSource()) .setExtractorsFactory(mDefaultExtractorsFactory) .setMinLoadableRetryCount(5) .setCustomCacheKey(customCacheKey == null ? uri.toString() : customCacheKey) .createMediaSource(uri); default: throw new IllegalStateException(context.getString(R.string.media_error)); } }
在初始化wholeMediaSource的时候使用您定义的MediaSourceBuilder 此贴是为了以后遇到此BUG的人提供参考 再次感谢作者的分享和贡献
The text was updated successfully, but these errors were encountered:
No branches or pull requests
感谢作者的分享和无私的奉献帮我解决BUG
问题描述:在大于8个小时的单视频循环播放会出现音频不同步问题
解决办法 :(1)这个是ExoPlayer的bug 设置FLAG_WORKAROUND_IGNORE_EDIT_LISTS可解决bug
参考:google/ExoPlayer#4559
(2)作者更新了代码 需要继承MediaSourceBuilder重写initMediaSource方法
代码如下:
@OverRide
public MediaSource initMediaSource(Uri uri) {
DefaultExtractorsFactory mDefaultExtractorsFactory= new DefaultExtractorsFactory();
mDefaultExtractorsFactory.setMp4ExtractorFlags(Mp4Extractor.FLAG_WORKAROUND_IGNORE_EDIT_LISTS);
int streamType = VideoPlayUtils.inferContentType(uri);
switch (streamType) {
case C.TYPE_OTHER:
return new ExtractorMediaSource.Factory(getDataSource())
.setExtractorsFactory(mDefaultExtractorsFactory)
.setMinLoadableRetryCount(5)
.setCustomCacheKey(customCacheKey == null ? uri.toString() : customCacheKey)
.createMediaSource(uri);
default:
throw new IllegalStateException(context.getString(R.string.media_error));
}
}
在初始化wholeMediaSource的时候使用您定义的MediaSourceBuilder
此贴是为了以后遇到此BUG的人提供参考
再次感谢作者的分享和贡献
The text was updated successfully, but these errors were encountered: