更新时间:2023-09-21 22:22:16
如果仅要求将比特率/质量与设备功能和当前网络条件相匹配,ExoPlayer将自动执行此操作.
ExoPlayer will do this automatically if the requirement is simply to match the bitrate/quality to the device capabilities and current network conditions.
如果您实际上希望允许用户手动选择它,则还可以使用Exoplayer2中的曲目选择器功能来支持它:
If you actually want to allow the user to select it manually, that is also supported using the track selector functionality in Exoplayer2:
GitHub上的演示应用程序包含TrackSelector功能,您可以根据需要进行查看和修改-大多数应用程序仅使用DefaultTrackSelector:
The demo app available in GitHub includes TrackSelector functionality which you can look at and modify as you need - most apps just use the DefaultTrackSelector: https://github.com/google/ExoPlayer