Issues when upgrading from v1 to v2 (available seek range, check network bandwith)
I am upgrading exoplayer from v1 to v2, now have a couple of API are missing in the v2, is there a way to check the below in v2? 1: Get the Available Seek Range, there is a listener InfoListener (onAvailableRangeChanged(int sourceId, TimeRange availableRange)) can get it in v1 2: Checking the bandwith, there is FormatEvaluator we can use in v1 3: There is a ManifestFetcher.EventListener that we can use to check the manifest in v1. (i want to get the first manifest and latest manifest during live stream)
Thanks.
For 1. and 3. you can use ExoPlayer#onTimelineChanged. The first argument will be the Timeline from which you can obtain the window. The second argument will either be or include the manifest (depending whether you are using DASH/SS or HLS).
For 2. I am not sure what checking the bandwidth means. To select the bandwidth, you can use your own AdaptiveSelectionFactory when building the media source. Or AdaptiveMediaSourceEventListener, if you want to see loading events.
@AquilesCanta Thank you for your response, about the bandwith, there is a user requirement that check the network speed, UI will show green, yellow or red light based on the network speed, is there a way to get the real-time bitrate in v2?
I guess you could call getBitrateEstimate from the BandwidthMeter you are using.