setLiveTranscoding method Null safety

Future<void> setLiveTranscoding(
  1. LiveTranscoding transcoding
)

Sets the video layout and audio settings for CDN live.

The SDK triggers the RtcChannelEventHandler.transcodingUpdated callback when you call this method to update the LiveTranscoding class. If you call this method to set the LiveTranscoding class for the first time, the SDK does not trigger the RtcChannelEventHandler.transcodingUpdated callback.

Note

  • Ensure that you enable the RTMP Converter service before using this function. See Prerequisites in Push Streams to CDN.
  • Ensure that the user joins a channel before calling this method.
  • This method can only be called by a broadcaster in a ChannelProfile.LiveBroadcasting channel .
  • Ensure that you call this method before calling the RtcChannel.addPublishStreamUrl method.

Parameter transcoding Sets the CDN live audio/video transcoding settings. See LiveTranscoding.

Implementation

@override
Future<void> setLiveTranscoding(LiveTranscoding transcoding) {
  return _invokeMethod('setLiveTranscoding', {
    'transcoding': transcoding.toJson(),
  });
}