setProperty method

Future<int> setProperty(
  1. String key,
  2. Object value
)

Call the advanced API interface of V2TXLivePlayer

@note This interface is used to call some advanced features. @param key The corresponding key for the advanced API, please refer to the definition of {@link V2TXLiveProperty} for details. @param value The parameters required when calling the advanced API corresponding to the key. @return The return value {@link V2TXLiveCode}. - 0: Success. - -2: Operation failed, key is not allowed to be nil.

调用 V2TXLivePlayer 的高级 API 接口

@note 该接口用于调用一些高级功能。 @param key 高级 API 对应的 key, 详情请参考 {@link V2TXLiveProperty} 定义。 @param value 调用 key 所对应的高级 API 时,需要的参数。 @return 返回值 {@link V2TXLiveCode}。 - 0: 成功。 - -2: 操作失败,key 不允许为 nil。

Implementation

Future<int> setProperty(String key, Object value) async {
  if (_isNeedDisposed) return -1;
  await _initPlayer.future;
  return await _livePlayerApi.setProperty(PlayerMsg(playerId: _playerId), key, value);
}