This topic describes the request parameters of streaming panel callbacks and provides examples of these callbacks.

Request parameters

Parameter Type Required Description
CasterId String No The ID of the streaming panel.
  • This parameter is required if the EventType parameter is set to OperateCallback or RuntimeErrorCallback.
  • This parameter is optional if the EventType parameter is set to EpisodeGroupCallback.
EventType String Yes The type of the event. Valid values:
  • OperateCallback: callback for operations.
  • RuntimeErrorCallback: callback for runtime errors.
  • EpisodeGroupCallback: callback for episode lists.
EventMessage EventMessage Yes The parameters of the event. For more information, see the EventMessage section of this topic.

EventMessage

  • The following table describes the event parameters that are applicable if the EventType parameter is set to OperateCallback or RuntimeErrorCallback.
    Parameter Type Required Description
    RequestId String No The ID of the request. This parameter is required if the EventType parameter is set to OperateCallback.
    SceneId String No The ID of the scene. This parameter is required for scene events.
    LayoutId String No The ID of the layout. This parameter is required for layout events.
    ResourceId String No The ID of the video source. This parameter is required for video source events.
    ComponentId String No The ID of the component. This parameter is required for component events.
    Code String No The status code.
    Message String No The description of the event.
  • The following table describes the event parameters that are applicable if the EventType parameter is set to EpisodeGroupCallback.
    Parameter 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 description of the event.

Status codes

Status code Description
Success No error occurred.
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 file failed to be opened.
ImageGetDecodeInfoFailed The decoding information of the image file failed to be queried.
ImageDecodeFailed The image file 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 third-party ingest URL is invalid.

Examples

Callbacks for operations

 {
    "CasterId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "EventType": "OperateCallback",
    "EventMessage": {
        "RequestId": "26A96B9A-A201-4EC3-8E43-CB92E68FA132",
        "SceneId": "35716B9A-A201-4EC3-8E43-CB92E68F1635",
        "ComponentId": "06196B9A-A201-4EC3-8E43-CB92E68F1634",
        "Code": "ImageOpenFailed",
        "Message": "Fail to open image: http://XXXX/XXXX.jpg"
    }
}

Callbacks for runtime errors

{
    "CasterId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "EventType": "RuntimeErrorCallback",
    "EventMessage": {
      "Code": "StreamInterrupt",
      "Message": "Failed to open stream: rtmp://DOMAIN/APP/STREAM"
    }
}