updatePublishMediaStream method

Future<void> updatePublishMediaStream(
  1. {required String taskId,
  2. required TRTCPublishTarget target,
  3. TRTCStreamEncoderParam? encoderParam,
  4. TRTCStreamMixingConfig? mixingConfig}
)

Modify publishing parameters. You can use this API to change the parameters of a publishing task initiated by startPublishMediaStream

config, The On-Cloud MixTranscoding settings

params, The encoding settings

target, The publishing destination

taskId, The task ID returned to you via the onStartPublishMediaStream callback

Platform not supported:

  • web
  • macOS
  • Windows

Implementation

Future<void> updatePublishMediaStream(
    {required String taskId,
    required TRTCPublishTarget target,
    TRTCStreamEncoderParam? encoderParam,
    TRTCStreamMixingConfig? mixingConfig}) async {
  return _cloudChannel!.invokeMethod('updatePublishMediaStream', {
    'taskId': taskId,
    'target': target.toJson(),
    'encoderParam': encoderParam?.toJson(),
    'mixingConfig': mixingConfig?.toJson()
  });
}