setPlayStreamFocusOn method

Future<void> setPlayStreamFocusOn(
  1. String streamID
)

Set the weight of the pull stream priority.

Available since: 1.1.0 Description: Set the weight of the streaming priority. Use cases: This interface can be used when developers need to prioritize the quality of a audio and video stream in business(do not use in pure audio case). For example: in class scene, if students pull multiple streams, you can set high priority for teacher stream. When to call: after called startPlayingStream. Restrictions: None. Caution: By default, all streams have the same weight. Only one stream can be set with high priority, whichever is set last. After the flow is stopped, the initial state is automatically restored, and all flows have the same weight.When the local network is not good, while ensuring the focus flow, other stalls may be caused more.

  • streamID Stream ID.

Implementation

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