为什么 ExoPlayer 在 Android API 低于 23 的旧设备上无法工作?

huangapple go评论115阅读模式
英文:

why ExoPlayer doesn't work on old devices with android API lower than 23?

问题

它花了相当多的时间才意识到,旧设备(API版本低于23)出现了一些问题,我进行了深入的搜索,但没有找到答案。因此,当我找到答案时,我认为值得与社区分享。

英文:

it took quite a few days to realize that something wrong is going on with old devices with API lower than 23 and I searched intensively but without an answer. So when I found my answer I thought that it's worth sharing with the community

答案1

得分: 1

我使用了多个模拟器版本,但奇怪的是,一些设备无法加载视频(突然停止),或者加载视频直到显示缩略图然后卡住,所以答案基本上是 ExoPlayer 没有问题,只是模拟器无法在 API 低于 23 的模拟器上播放媒体,这是由于解码器问题,但在通常情况下,ExoPlayer 在 Android 16+ API 的设备上将正常工作。您可以查看文档 获取更多详细信息。

英文:

I used multiple emulator versions but the weird thing is that some devices couldn't either load the video (sudden stop) or it loads it till showing the thumbnail and it freezes, so the answer is basically that nothing is wrong with ExoPlayer, it's just the emulator that cannot play the media with an emulator with lower API than 23 due to a decoder issue but mainly on a usual use ExoPlayer will function properly with android devices of 16+ API. you can check the DOCUMENTATION for more details.

答案2

得分: 0

这可能会有点晚,但希望能对某人有所帮助。
来自ExoPlayer文档的摘录。一些Android模拟器未能正确实现Android媒体堆栈的组件,因此不支持ExoPlayer。这是模拟器的问题,而不是ExoPlayer的问题。Android官方模拟器(在Android Studio中称为“虚拟设备”)支持ExoPlayer,只要系统映像的API级别至少为23。具有较早API级别的系统映像不支持ExoPlayer。第三方模拟器提供的支持水平各不相同。在第三方模拟器上运行ExoPlayer时出现问题应向模拟器的开发者报告,而不是向ExoPlayer团队报告。在可能的情况下,我们建议在实际设备上测试媒体应用,而不是在模拟器上。

英文:

It might be late,but hope help someone.
Excerpt from ExoPlayer Doc. Some Android emulators do not properly implement components of Android’s media stack, and as a result do not support ExoPlayer. This is an issue with the emulator, not with ExoPlayer. Android’s official emulator (“Virtual Devices” in Android Studio) supports ExoPlayer provided the system image has an API level of at least 23. System images with earlier API levels do not support ExoPlayer. The level of support provided by third party emulators varies. Issues running ExoPlayer on third party emulators should be reported to the developer of the emulator rather than to the ExoPlayer team. Where possible, we recommend testing media applications on physical devices rather than emulators.

huangapple
  • 本文由 发表于 2020年8月17日 12:02:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/63444406.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定