logo
Video Call
Server API
Stream Mixing and Transcoding APIs
On this page

DeleteStream

GET

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 SDKLiveRoom SDK
iOS/macOSonRoomStreamUpdateonStreamUpdated
AndroidonRoomStreamUpdateonStreamUpdated
WindowsonRoomStreamUpdateOnStreamUpdated
WebroomStreamUpdateonStreamUpdated
Rate Limit
For all Rooms under the same AppID: 10 times/second (test environment: 1 time/second)
Attention

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

    Action stringrequired

    Possible values: [DeleteStream]

    Interface prototype parameter

    https://rtc-api.zego.im?Action=DeleteStream

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    RoomId stringrequired

    Room ID.

    UserId stringrequired

    User ID.

    UserName string

    User Name.

    StreamId stringrequired

    Stream ID.

Responses

Operation successful
Schema
    Code int32

    Return Code.

    The following only lists some return codes related to the interface business logic. For complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSuggested Handling
    124Failed to delete stream information.Please retry, or contact ZEGOCLOUD technical support for assistance.
    138Stream information does not exist.Please retry, or contact ZEGOCLOUD technical support for assistance.
    Message string

    Description of the operation result.

    RequestId string

    Request ID.

Previous

AddStream

Next

DescribeSimpleStreamList

On this page

Back to top