mutePlayStreamVideo method

Future<void> mutePlayStreamVideo(
  1. String streamID,
  2. bool mute
)

Whether the pull stream can receive the specified video data.

Available since: 1.1.0 Description: In the process of real-time video and video interaction, local users can use this function to control whether to receive video data from designated remote users when pulling streams as needed. When the developer does not receive the video data, the hardware and network overhead can be reduced. Use cases: This function can be called when developers need to quickly close and resume watching remote video. Compared to re-flow, it can greatly reduce the time and improve the interactive experience. When to call: This function can be called after calling createEngine. Caution:

  1. When used together with muteAllPlayVideoStreams, they can override each other's configurations.
  2. When used together with muteAllPlayStreamAudio, this function only works when the muteAllPlayStreamVideo function is set to false.
  3. When you mute the video stream, the view remains at the last frame by default, if you need to clear the last frame, please contact ZEGO technical support.
  4. After stopping streaming, any properties previously set for this stream such as setPlayVolume, mutePlayStreamAudio, mutePlayStreamVideo and other streaming-related configurations will become invalid and need to be reset before the next stream is pulled. Related APIs: You can call the muteAllPlayStreamVideo function to control whether to receive all video data. When the two functions muteAllPlayStreamVideo and mutePlayStreamVideo are set to false at the same time, the local user can receive the video data of the remote user when the stream is pulled: 1. When the muteAllPlayStreamVideo(true) function is called, it will take effect globally, that is, local users will be prohibited from receiving all remote users' video data. At this time, the mutePlayStreamVideo function will not take effect whether it is called before or after muteAllPlayStreamVideo. 2. When the muteAllPlayStreamVideo(false) function is called, the local user can receive the video data of all remote users. At this time, the mutePlayStreamVideo function can be used to control whether to receive a single video data. Call the mutePlayStreamVideo(true, streamID) function, the local user can receive other video data other than the streamID; call the mutePlayStreamVideo(false, streamID) function, the local user can receive all the video data. Note: This function is only available in ZegoExpressVideo SDK!
  • streamID Stream ID.
  • mute Whether it is possible to receive the video data of the specified remote user when streaming, "true" means prohibition, "false" means receiving, the default value is "false". The default value for automatically played streams within the SDK is false.

Implementation

Future<void> mutePlayStreamVideo(String streamID, bool mute) async {
  return await ZegoExpressImpl.instance.mutePlayStreamVideo(streamID, mute);
}