startPublishMediaStream method
Future<void>
startPublishMediaStream({
- required TRTCPublishTarget target,
- TRTCStreamEncoderParam? params,
- TRTCStreamMixingConfig? config,
Publish a stream. After this API is called, the TRTC server will relay the stream of the local user to a CDN (after transcoding or without transcoding), or transcode and publish the stream to a TRTC room.
target
, The On-Cloud MixTranscoding settings
param
, The encoding settings
config
, The publishing destination
Platform not supported:
- 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()
});
}