onPublisherVideoEncoderChanged property
The callback triggered when the video encoder changes in publishing stream.
Available since: 2.12.0 Description: After the H.265 automatic downgrade policy is enabled, if H.265 encoding is not supported or the encoding fails during the streaming process with H.265 encoding, the SDK will actively downgrade to the specified encoding (H.264), and this callback will be triggered at this time. When to trigger: In the process of streaming with H.265 encoding, if H.265 encoding is not supported or encoding fails, the SDK will actively downgrade to the specified encoding (H.264), and this callback will be triggered at this time. Caution: When this callback is triggered, if local video recording or cloud recording is in progress, multiple recording files will be generated. Developers need to collect all the recording files for processing after the recording ends. When this callback is triggered, because the streaming code has changed, the developer can evaluate whether to notify the streaming end, so that the streaming end can deal with it accordingly.
fromCodecID
Video codec ID before the change.toCodecID
Video codec ID after the change.channel
Publishing stream channel.If you only publish one audio and video stream, you can ignore this parameter.
Implementation
static void Function(ZegoVideoCodecID fromCodecID, ZegoVideoCodecID toCodecID,
ZegoPublishChannel channel)? onPublisherVideoEncoderChanged;