Unable to play MKV Matroska video with exoPlayer 2.11

前端 未结 2 805
误落风尘
误落风尘 2021-01-17 22:44

In my video player when i try to play MKV Matroska file it stay still the video is not playing.

i followed CodeLabs and ExoPlayer Dev and build player it

2条回答
  •  太阳男子
    2021-01-17 23:06

    Try to make MediaSource like this:

    private MediaSource buildMediaSource(Uri uri) {
        DataSource.Factory dataSourceFactory =
            new DefaultDataSourceFactory(this, "exoplayer");
        return new ExtractorMediaSource.Factory(dataSourceFactory)
            .createMediaSource(uri);
    }
    

提交回复
热议问题