takePublishStreamSnapshot method
Take a snapshot of the publishing stream for the specified publish channel.
Available since: 1.17.0
Description: Take a snapshot of the publishing stream.
When to call: Called this function after calling startPublishingStream or startPreview.
Restrictions: None.
Caution: The resolution of the snapshot is the encoding resolution set in setVideoConfig. If you need to change it to capture resolution, please call setCapturePipelineScaleMode to change the capture pipeline scale mode to Post.When using custom video capture, screenshots cannot be taken if only startPublishingStream is called for stream pushing without invoking startPreview to enable screen preview.
Related callbacks: The screenshot result will be called back through ZegoPublisherTakeSnapshotCallback.
Related APIs: takePlayStreamSnapshot.
Note: This function is only available in ZegoExpressVideo SDK!
channelPublish stream channel.- Returns Results of take publish stream snapshot.
Implementation
Future<ZegoPublisherTakeSnapshotResult> takePublishStreamSnapshot(
{ZegoPublishChannel? channel}) async {
return await ZegoExpressImpl.instance
.takePublishStreamSnapshot(channel: channel);
}