Livestreaming a Dyte Meeting via HLS
In this guide you will learn how to start and stop livestreaming a Dyte meeting.
Before getting started with this guide, we recommend that you read Getting Started with Dyte to familiarize yourself with Dyte.
Start a livestream
To start livestreaming a meeting, do the following:
Request
Specify the meeting ID
of the meeting that you want to live stream in the
following request.
Use the Fetch all meetings for an
organization or Create a meeting API to
get the meeting ID. The API returns a parameter called id
, which is your
meeting ID
.
curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/livestreams \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'
Response
{
"success": true,
"data": {
"status": "OFFLINE",
"name": null,
"meeting_id": "188566bc-8770-4ca0-9eb3-24b594ecaf7e",
"ingest_server": "rtmps://2ec802dd47b0.global-contribute.live-video.net:443/app/",
"id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0",
"stream_key": "sk_ap-south-1_AfnVpeYZjidO_fBpWKody7sDUOEfy9Zc6XAZegkR0Va",
"playback_url": "https://2ec802dd47b0.ap-south-1.playback.live-video.net/api/video/v1/ap-south-1.9449086423410.channel.rVGDS2KM5Lnteh.m3u8"
}
}
Note: To begin live streaming the meeting as soon as it starts, simply specify
live_stream_on_start
parameter in the
Create a meeting API.
Fetch active livestream
Fetching details of an active livestream is also an HTTP request away.
Request
Specify the meeting_id
of the meeting that you want to fetch the active
livestream for.
Use the Fetch all meetings for an
organization or Create a meeting API to
get the meeting ID. The API returns a parameter called id
, which is your
meeting ID
.
curl --request GET \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/active-livestream \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'
Response
{
"success": true,
"data": {
"status": "LIVE",
"name": null,
"meeting_id": "188566bc-8770-4ca0-9eb3-24b594ecaf7e",
"ingest_seconds": 0,
"viewer_seconds": 0,
"ingest_server": "rtmps://2ec802dd47b0.global-contribute.live-video.net:443/app/",
"id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0",
"stream_key": "sk_ap-south-1_AfnVpeYZjidO_fBpWKody7sDUOEfy9Zc6XAZegkR0Va",
"playback_url": "https://2ec802dd47b0.ap-south-1.playback.live-video.net/api/video/v1/ap-south-1.944908621410.channel.rVKA2KM5Lunt.m3u8"
}
}
Stop a livestream
You need the meeting_id
of the meeting that you want to stop live streaming.
Request
Specify the meeting_id
of the meeting that you want to fetch the active
livestream for.
Use the Fetch all meetings for an
organization or Create a meeting API to
get the meeting ID. The API returns a parameter called id
, which is your
meeting ID
.
curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/meetingId/active-livestream/stop \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'
Response
{
"success": true,
"data": {
"message": "livestream stopped"
}
}
Livestreaming State Management APIs
Dyte's livestreaming state management APIs allow you to manage stage requests, such as leave and join stage, manage permissions, kick participants and so on. For more information, see Livestreaming State Management APIs.
Livestreaming Properties, Functions, and Events
For the detailed information on livestreaming properties, events, and functions, see Livestreaming: Properties, Functions, and Events.