Skip to main content

WebHook

To notify your application about things that happen asynchronously , Create a Web Hook.

After successfully registering the webhook, whenever the status of live stream changes, response will be sent to the webhook.

Sample webhook response for livestream is as follows

{
"title": "Data science Live class",
"bytes": null,
"type": "livestream",
"video": null,
"id": "4PtERT9d9uK",
"live_stream": {
"rtmp_url": "rtmp://23.427.127.24/live",
"stream_key": "org-4xu8ay-live-4PtERT9d9uK-jKP4",
"status": "Streaming",
"hls_url": "https://d28qihy7z761lk.cloudfront.net/live/4xu8ay/4PtERT9d9uK/video.m3u8",
"start": null,
"transcode_recorded_video": true,
"chat_embed_url":"https://app.tpstreams.com/live-chat/4PtERT9d9uK/"
},
"parent_id": null
}

Streaming Status Table

StatusDescription
Not StartedLive stream server not created or started.
StreamingThe live stream is active, typically streamed via OBS.
RecordingAfter stopping the live stream, it enters recording state, initiating transcoding.
DisconnectedLive streaming is stopped in OBS, either manually or due to network issues.
ErrorError encountered while starting the live stream.
CompletedTranscoding is completed, transitioning the status to "Completed."
info

When the status of TPStreams changes:

  • If the status of the live stream changes to Disconnected, initiate a direct reconnection using OBS.
  • If the status changes to Error, create a new live stream.