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 .
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
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments