setCacheParams method
Set the minimum and maximum time (in seconds) for the player cache to automatically adjust
Parameter:
minTime
The minimum time for the cache to be automatically adjusted must be greater than 0. Default value: 1
maxTime
The maximum time for cache auto-adjustment must be greater than 0. Default value: 5
Return:
- V2TXLIVE_OK: Succeed
- V2TXLIVE_ERROR_INVALID_PARAMETER: The operation failed, and minTime and maxTime need to be greater than 0
- V2TXLIVE_ERROR_REFUSED: The player is in the playback state and cannot modify the cache policy
Implementation
Future<V2TXLiveCode> setCacheParams(double minTime, double maxTime) async {
var result = await _channel.invokeMethod('setCacheParams', {
"minTime": minTime.toString(),
"maxTime": maxTime.toString()
});
return _liveCodeWithResult(result);
}