Configures stream pushing callbacks for a stream pushing domain.

Note This operation can be called up to 15 times per second.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetLiveStreamsNotifyUrlConfig

The operation that you want to perform. Set the value to SetLiveStreamsNotifyUrlConfig.

DomainName String Yes example.com

The stream pushing domain.

NotifyUrl String Yes http://play.aliyunlive.com/notify

The URL to which the callback notifications about stream pushing are sent. The URL must start with http://.

Response parameters

Parameter Type Example Description
RequestId String 40A4F36D-A7CC-473A-88E7-154F92242566

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=SetLiveStreamsNotifyUrlConfig
&DomainName=example.com
&NotifyUrl=http://play.aliyunlive.com/notify
&<Common request parameters>

Sample success responses

XML format

<SetLiveStreamsNotifyUrlConfigResponse>
      <RequestId>4C747C97-7ECD-4C61-8A92-67AD806331FF</RequestId>
</SetLiveStreamsNotifyUrlConfigResponse>

JSON format

{
    "RequestId":"4C747C97-7ECD-4C61-8A92-67AD806331FF"
}

Error codes

For a list of error codes, visit the API Error Center.

Callback logic

Callback logic for live stream pushing status:

During stream pushing over Real-Time Messaging Protocol (RTMP), ApsaraVideo Live checks whether the stream pushing client closes the connection within 2 seconds after ApsaraVideo Live receives an OnPublish message. If the stream pushing client does not close the connection, ApsaraVideo Live sends a callback notification about successful stream pushing. You may require ApsaraVideo Live to send this callback notification only when ApsaraVideo Live receives live streaming data after the connection is established. In this case, submit a ticket.

Assume that you have stream pushing domain A and streaming domain B, and you use the stream pulling feature for live streaming under streaming domain B. You can configure ApsaraVideo Live to pull a stream at the specified time, or enable ApsaraVideo Live to automatically pull a stream when the origin server starts live streaming. If you want to receive a callback notification about the stream pulling status, configure stream pushing callbacks for stream pushing domain A. After the configuration, ApsaraVideo Live uses the same callback logic as that for live stream pushing status to send callback notifications about the stream pulling status under streaming domain B. By default, ApsaraVideo Live sends a callback notification about successful stream pulling if the stream pulling client does not close the connection within 2 seconds after the connection is established. If you require ApsaraVideo Live to send this callback notification only when live streaming data is received, submit a ticket.

Note We recommend that you deliver the streaming URL only after you determine that stream pushing or pulling is successful based on callback notifications and the list of online streams.