Production studio callbacks

Updated at:
Copy as MD

Production studio callbacks deliver event notifications for operations, runtime errors, and playback progress. This topic covers the request parameters, status codes, and callback examples.

Request parameters

Parameter Type Required Description
CasterId String No The ID of the production studio.
  • Required when EventType is set to OperateCallback or RuntimeErrorCallback.
  • Optional when EventType is set to EpisodeGroupCallback.
EventType String Yes The type of the event.
  • OperateCallback: callback for operations.
  • RuntimeErrorCallback: callback for runtime errors.
  • EpisodeGroupCallback: callback for carousel playback.
  • ShowListDTSCallback: callback for playback progress of the current episode if the production studio is in playlist mode.
EventMessage EventMessage Yes The event details. For more information, see the EventMessage section of this topic.

EventMessage

  • EventMessage fields when EventType is set to OperateCallback or RuntimeErrorCallback:
    Field Type Required Description
    RequestId String No The request ID. Required when EventType is set to OperateCallback.
    SceneId String No The scene ID. Required for scene events.
    LayoutId String No The layout ID. Required for layout events.
    ResourceId String No The resource ID. Required for video source events.
    ComponentId String No The component ID. Required for component events.
    Code String No The status code.
    Message String No The message of the event.
  • EventMessage fields when EventType is set 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.
  • EventMessage fields when EventType is set 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 repeat count of the video-on-demand (VOD) file 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"
}