ProgressiveMediaSource

ProgressiveMediaSource

the ExoPlayer documentation,“Hello World”示例建议您播放标准视频时应使用ProgressiveMediaSource(与我见过的许多在线教程建议您使用ExtractorMediaSource相比)

查看source code for ExoPlayer,它声称不推荐使用ExtractorMediaSource,而ProgressiveMediaSource取代了它:

/** @deprecated Use {@link ProgressiveMediaSource} instead. */

在我自己的项目中,我正在使用ExoPlayer v2.9.5-which is the latest version on jcenter, released February 2019

但是,当我尝试实例化ProgressiveMediaSource时,出现错误:
Cannot resolve symbol 'ProgressiveMediaSource'

为什么我找不到这个班级?我究竟做错了什么?

最佳答案

java - 为什么找不到ProgressiveMediaSource?-LMLPHP

我发现通过单击此选项卡,列出了较新版本的ExoPlayer。

在版本2.10.0中添加了ProgressiveMediaSource
但是,2.10.0版也从Android支持库切换到AndroidX,因此,如果要使用它,则必须将整个项目升级到AndroidX。

07-24 20:32