Is videoview supports adaptive streaming in android?

ぃ、小莉子 提交于 2019-12-11 00:37:35

问题


In Android is there any way way to support Adaptive Streaming while using Android VideoView.

I am playing HLS video inside VideoView. Now i want to change the quality of the video based on the bandwidth. if bandwidth is low then VideoView should play the low bitrate content and if bandwidth is high then VideoView should play the high bitrate video.

I have searched a lot but did not get any satisfactory result.

I have searched the player like ExoPlayer they are doing this.

Please follow the below link :

See Adaptive media playbacks topic of this link

Please revert if anyone have any idea .


回答1:


The Android VideoView should be replaced by ExoPlayer for various reasons, mainly because third party manufacturers typically modify the VideoView causing inconsistent support for things like HLS; for this reason I will base my answer on you using the ExoPlayer.

HLS, and other adaptive playback protocols such as DASH or Smooth Stream, automatically changes the playback quality based on the network. In particular, the HlsRenderBuilder takes a BandwidthMeter (see HlsRenderBuilder#L131). If you are worried the default functionality isn't efficient enough then you can provide a customized BandwithMeter.

For simplicity you should use a wrapper around the ExoPlayer such as ExoMedia that provides quick integration with APIs similar to the Android VideoView



来源:https://stackoverflow.com/questions/39325914/is-videoview-supports-adaptive-streaming-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!