API Reference - Interactive Live Streaming
This page describes the API references for interactive live streaming.
Table of Contents
please pass apiKey with tied with your sariska account
iufwenufewifweifiuTbddhbdjhjfbjfjwfjwfjpass exp claim of jwt token
24 hourspass nbf claim of jwt token
pass scope of token it can be messaging or media or sariska or leave it blank
A successfully generated response for jwt token
Failed to generate token
POST /api/v1/misc/generate-token HTTP/1.1
Host: api.sariska.io
Content-Type: application/json
Accept: */*
Content-Length: 219
{
"apiKey": "iufwenufewifweifiuTbddhbdjhjfbjfjwfjwfj",
"user": {
"id": "ytyVgh",
"name": "Nick",
"email": "[email protected]",
"avatar": "https://some-storage-location/nick.jpg",
"moderator": false
},
"exp": "24 hours",
"nbf": "",
"scope": ""
}{
"token": "text"
}This is a list of additional RTMP URLs for platforms not included in the above-listed platforms or host URL is dynamic
The room name recorder needs to join.
room1234Whether the live streaming needs to be in low latency
trueThe player side codec default is H264
H265Please set this flag to true if you want MP4 recordings of the live stream.
trueIf true is passed, the stream will be transcoded into 5 different variants: 720p (HD), 480p (HD_MID), 360p (MID), 240p (MID_LOW), and 240p (LOW) with bitrates of 2628kbps, 1128kbps, 878kbps, 528kbps, and 264kbps, respectively. This will ensure the best possible viewing experience, regardless of the user's network or device.
truePlease set this flag to true if you want to access the Video on Demand (VOD) URL. The VOD will be available after the live streaming has finished.
truePlease set this flag to true if you want the participant name to appear in the video tiles.
truePlease set this flag to true if you want the streaming to be audio-only.
trueBy default, the live streaming layout is optimized for desktop. If you want it to be optimized for mobile, you can pass the flag mobile
mobileBy default, adaptive bitrate streaming is enabled between the videobridge and recorder for each participant's stream. However, if you want to record and stream each participant's original quality, you can pass the flag as HD
HDThe default time interval for the recorder is 1 minute. If a different time interval is set, the recorder will remain active for that duration, and if all participants leave before the interval ends, a new streaming API call must be made to restart the recording.
6000 equivalent to 1 minA generated response after live streaming started successfully
Bad request
Authenticatin token has expired
Not able to process your http request
Server crash
Failed to start streaming within 30 seconds of time , if you receive this request then you can resend the request again.
POST /terraform/v1/hooks/srs/startRecording HTTP/1.1
Host: api.sariska.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 584
{
"stream_keys": [
{
"key": "youtube",
"value": "youtube_stream_key"
},
{
"key": "facebook",
"value": "facebook_stream_key"
},
{
"key": "twitch",
"value": "twitch_stream_key"
},
{
"key": "vimeo",
"value": "vimeo_stream_key"
},
{
"key": "instagram",
"value": "instagram_stream_key"
}
],
"stream_urls": [
"rtmp://linkedin.{dynamic-secret}.rtmp.url, rtmp://microsoft.{dynamic-secret}.rtmp.url"
],
"room_name": "room1234",
"is_low_latency": true,
"codec": "H265",
"is_recording": true,
"multi_bitrate": true,
"is_vod": true,
"username": true,
"audio_only": true,
"layout": "mobile",
"profile": "HD",
"reconnect_window": "6000 equivalent to 1 min"
}{
"started": true,
"stream_name": "text",
"pod_name": "text",
"hls_url": "text",
"low_latency_hls_url": "text",
"vod_url": "text",
"rtmp_url": "text",
"flv_url": "text"
}stops streaming of given room name
room1234A generated response for successfully stopped streaming
Bad request
Authenticatin token has expired
Not able to process your http request
Server crash
Failed to stop streaming within 30 seconds of time , if you receive this request then you can resend the request again.
POST /terraform/v1/hooks/srs/stopRecording HTTP/1.1
Host: api.sariska.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"room_name": "room1234"
}{
"started": false
}A generated response for fetching live hls users count
GET /terraform/v1/hooks/srs/live/viewers/count/{stream_name} HTTP/1.1
Host: api.sariska.io
Accept: */*
A generated response for fetching live hls users count
{
"{stream_name}": {
"current_viewers": 1,
"uptime": 1
}
}A generated response for fetching live hls users count
GET /llhls/v1/hooks/srs/live/viewers/count/{stream_name} HTTP/1.1
Host: api.sariska.io
Accept: */*
A generated response for fetching live hls users count
{
"{stream_name}": {
"current_viewers": 1,
"uptime": 1
}
}Last updated