DeleteStream
https://rtc-api.zego.im/
Call this interface to delete a specified stream from a Room. Unlike Kick out User, the User corresponding to this Stream is still in the Room. This interface can be used to forcibly "remove the mic" from a User, or to delete the added CDN live Stream in a "watch together" scenario.
This interface is only used to send notifications related to Stream deletion within the Room, and does not perform the actual stop publishing Stream operation. Developers need to call the stopPublishingStream interface from their client to stop publishing the Stream, which will stop transmitting audio and video data to the streaming media; accordingly, the playing Stream side needs to call the client stopPlayingStream interface to stop playing the Stream, which will stop receiving audio and video data from the streaming media.
Clients use the ZEGO Express SDK callback interface to receive notifications of Stream reduction in the Room:
| ZegoExpress SDK | LiveRoom SDK | |
|---|---|---|
| iOS/macOS | onRoomStreamUpdate | onStreamUpdated |
| Android | onRoomStreamUpdate | onStreamUpdated |
| Windows | onRoomStreamUpdate | OnStreamUpdated |
| Web | roomStreamUpdate | onStreamUpdated |
When calling this server-side interface:
- It is not recommended to use the same UserId as the actual User in the Room, to avoid conflicts with the Stream deletion behavior of the client SDK. You can use a specific name to identify it as a server-side behavior, for example: userId = "Server-Administrator".
- If the same UserId as the actual User in the Room is used (not recommended), the client of the corresponding operator UserId will not receive the Stream deletion callback triggered by this server-side interface, while other Users in the Room will receive the Stream deletion callback.
Request
Query Parameters
Possible values: [DeleteStream]
Interface prototype parameter
https://rtc-api.zego.im?Action=DeleteStream
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.
💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.
💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
Room ID.
User ID.
User Name.
Stream ID.
Responses
- 200
- application/json
