Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is videoview supports adaptive streaming in android?

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 .

like image 691
nitin tyagi Avatar asked Dec 02 '25 10:12

nitin tyagi


1 Answers

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

like image 101
RocketSpock Avatar answered Dec 05 '25 00:12

RocketSpock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!