startPublishMediaStream method
- {required TRTCPublishTarget target,
- TRTCStreamEncoderParam? params,
- TRTCStreamMixingConfig? config}
开始发布媒体流。调用此 API 后,TRTC 服务器将把本地用户的流中继到 CDN(经过转码或不经过转码),或转码并发布到 TRTC 房间。
target
,云端混流设置
param
,编码设置
config
,发布目标
不支持:
- web
- macOS
- Windows
Implementation
Future<void> startPublishMediaStream({required TRTCPublishTarget target,
TRTCStreamEncoderParam? params,
TRTCStreamMixingConfig? config}) async {
return _cloudChannel.invokeMethod('startPublishMediaStream', {'target': target.toJson(),
'param': params?.toJson(),
'config': config?.toJson()});
}