setNetWorkBufferThreshold abstract method
- int threshold
Use this interface to set the cache threshold that the media player needs to resume playback. The SDK default value is 5000ms,The valid value is greater than or equal to 1000ms
The setting must be called before loading the resource, and it will take effect during the entire life cycle of the media player.
When the network status is poor and the media player has finished playing the cached network resources, it will stop playing, and notify the user through the ZegoMediaPlayerNetworkEvent.BUFFER_BEGIN
state of the callback interface onMediaPlayerNetworkEvent
that the network resources are being recached.
Only when the cached network resources are greater than the set threshold, the media player will automatically resume playback at the original paused position, and notify the user through the ZegoMediaPlayerNetworkEvent.BUFFER_ENDED
of the callback interface onMediaPlayerNetworkEvent
that the user has cached the network resources The threshold was reached and playback resumed.
threshold
Threshold that needs to be reached to resume playback, unit ms.
Implementation
Future<void> setNetWorkBufferThreshold(int threshold);