stopPlayingStream method

Future<void> stopPlayingStream(
  1. String streamID
)

Stops playing a stream.

Available since: 1.1.0 Description: Play audio and video streams from the ZEGO RTC server. Use cases: In the real-time scenario, developers can listen to the onRoomStreamUpdate event callback to obtain the delete stream information in the room where they are located, and call this interface to pass in streamID for stop play streams. When to call: After loginRoom. Restrictions: None. Caution: When stopped, the attributes set for this stream previously, such as setPlayVolume, mutePlayStreamAudio, mutePlayStreamVideo, etc., will be invalid and need to be reset when playing the the stream next time.

  • streamID Stream ID.

Implementation

Future<void> stopPlayingStream(String streamID) async {
  return await ZegoExpressImpl.instance.stopPlayingStream(streamID);
}