This topic describes the request parameters of production studio callbacks and provides examples of these callbacks.
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
CasterId | String | No | The ID of the production studio.
|
EventType | String | Yes | The type of the event.
|
EventMessage | EventMessage | Yes | The description of the event. For more information, see the EventMessage section of this topic. |
EventMessage
- The following table describes the fields of the EventMessage parameter if you set
the EventType parameter to OperateCallback or RuntimeErrorCallback.
Field Type Required Description RequestId String No The ID of the request. This field is required if you set the EventType parameter to OperateCallback. SceneId String No The ID of the scene. This field is required for scene events. LayoutId String No The ID of the layout. This field is required for layout events. ResourceId String No The ID of the resource. This field is required for video source events. ComponentId String No The ID of the component. This field is required for component events. Code String No The status code. Message String No The message of the event. - The following table describes the fields of the EventMessage parameter if you set
the EventType parameter to EpisodeGroupCallback.
Field Type Required Description ProgramId String Yes The ID of the episode list for carousel playback. EpisodeId String Yes The ID of the episode. Code String No The status code. Message String No The message of the event. - The following table describes the fields of the EventMessage parameter if you set
the EventType parameter to ShowListDTSCallback.
Field Type Required Description ProgressTime String Yes The playback progress of the episode. Unit: milliseconds. ShowId String Yes The ID of the episode. Duration String Yes The total length of the episode. ShowName String Yes The name of the episode.
Status codes
Status code | Description |
---|---|
Success | The operation is successful. |
StreamInterrupt | The playback of live streams or files is unexpectedly terminated. |
CanvasStreamInterrupt | The canvas stream is unexpectedly terminated. |
AudioResampleFailed | The audio resampling failed. |
AudioAddFailed | The audio source failed to be added. |
AudioDelFailed | The audio source failed to be deleted. |
AudioStreamTypeInvalid | The type of the audio stream failed to be parsed. |
VideoTypeInvalid | The type of the layer failed to be parsed. |
VideoVisibleInvalid | The visibility of the layer element failed to be parsed. |
VideoTransparencyInvalid | The transparency value of the layer element failed to be parsed. |
VideoEffectInvalid | The effect value of the layer element failed to be parsed. |
VideoWidthInvalid | The normalized value of the width of the layer element failed to be parsed. |
VideoPositionReferInvalid | The reference axis of the layer element failed to be parsed. |
VideoStreamTypeInvalid | The media type failed to be parsed. Media types include live streams and files. |
VideoRepeatNumInvalid | The number of times that the video-on-demand (VOD) file is repeated failed to be parsed. |
VideoStreamAddFailed | The live stream failed to be added. |
ImageOpenFailed | The image failed to be opened. |
ImageGetDecodeInfoFailed | The decoding information of the image failed to be queried. |
ImageDecodeFailed | The image failed to be decoded. |
TextInvalid | The text failed to be parsed. |
TextFontInvalid | The font of the text failed to be parsed. |
TextSizeInvalid | The normalized value of the font size of the text failed to be parsed. |
TextBorderWidthInvalid | The normalized value of the border width of the text failed to be parsed. |
CanvasLoadFailed | The canvas stream failed to be loaded. |
SideOutputUrlInvalid | The stream redirect URL is invalid. |
Examples
Callback for operations
{
"CasterId": "16A96B9A-F203-4EC5-8E43-CB92E68F****",
"EventType": "OperateCallback",
"EventMessage": {
"RequestId": "26A96B9A-A201-4EC3-8E43-CB92E68FA132",
"SceneId": "35716B9A-A201-4EC3-8E43-CB92E68F****",
"ComponentId": "06196B9A-A201-4EC3-8E43-CB92E68F****",
"Code": "ImageOpenFailed",
"Message": "Fail to open image: http://XXXX/XXXX.jpg"
}
}
Callback for runtime errors
{
"CasterId": "16A96B9A-F203-4EC5-8E43-CB92E68F****",
"EventType": "RuntimeErrorCallback",
"EventMessage": {
"Code": "StreamInterrupt",
"Message": "Failed to open stream: rtmp://DOMAIN/APP/STREAM"
}
}
Callback for playback progress
{
"EventMessage": {
"ProgressTime": "116796",
"ShowId": "9ef1db9d-5e24-4e5f-b161-8a2429d9b882",
"Duration": "396847",
"ShowName": "test.mp4"
},
"EventType": "ShowListDTSCallback",
"ResponseTime": 1663731128684,
"CasterId": "3761c920-dfa6-40c7-a79c-2886b1493996"
}