Video Livestream docs
This page shows you the API calls required to implement our livestreaming. The API requires a token which you can retrieve after creating a my.isset.video account.
The following request is used to retrieve a list of your RTMP details.
GET https://publish.isset.video/api/livestream-keys with the supplied x-auth-token in the header.
x-token-auth: your-token-here
Curl PHP example:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://publish.isset.video/api/livestream-keys',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-token-auth: {your-token-here}',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
This will result in the following response.
{
"results": [
{
"rtmp_key": "{your-rtmp-key}",
"rtmp_url": "rtmp://livestream.isset.video/src/",
"identifier": "{some-random-identifier}"
}
]
}
Use the RTMP key and RTMP url in your streaming application and start streaming right away.
The following request is used to play and share your current livestream. Add the client ip to make sure this playout url is only usable by one client.
GET https://publish.isset.video/api/livestreams/current?clientIp={your-client-ip-here} with the supplied x-auth-token in the header.
x-token-auth: your-token-here
Curl PHP example:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://publish.isset.video/api/livestreams/current?clientIp={your-client-ip-here}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-token-auth: {your-token-here}',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
This will result in the following response.
{
"uuid": "{unique-uuid}",
"name": "Livestream 02-02-2022",
"description": null,
"date_created": "2022-02-02T00:00:00+00:00",
"date_updated": "2022-02-02T00:00:00+00:00",
"date_started": null,
"date_ended": null,
"archive_uuid": null,
"share_url": "https://my.isset.video/live/share/{unique-token}",
"embed_url": "https://my.isset.video/live/embed/{unique-token}",
"playout_url": "https://live.stream.isset.video/{unique-playout-path}",
"publish": null
}
Use the playout URL if you have your own video player. Use the embed url to embed our player in an iframe on your site. Use the share url to share the isset.video livestream page with people and start watching right away.
The following request is used to retrieve a list of current and previous livestreams for your account.
GET https://publish.isset.video/api/livestreams with the supplied x-auth-token in the header.
x-token-auth: your-token-here
Available query parameters:
Curl PHP example:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://publish.isset.video/api/livestreams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-token-auth: {your-token-here}",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
This will result in the following response.
{
"total": 1,
"from": 0,
"size": 20,
"results": [
{
"uuid": "49875972-26f7-4697-8d06-17ea34d16577",
"stream_key": "example-key",
"rtmp_url": "rtmp://livestream.isset.video/src/",
"name": "Livestream 01-01-2022",
"description": null,
"date_created": "2022-01-01T01:01:01+00:00",
"date_updated": "2022-01-01T01:01:01+00:00",
"date_started": "2022-01-01T01:01:01+00:00",
"date_ended": null,
}
]
}
The following request is used to retrieve the playout url (or player) for a livestream. Add the client ip to make sure this playout url is only usable by one client.
GET https://publish.isset.video/api/livestreams/{livestreamUuid}?clientIp={yourClientIp} with the supplied x-auth-token in the header.
x-token-auth: your-token-here
Curl PHP example:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://publish.isset.video/api/livestreams/{your-publish-uuid-here}?clientIp={your-client-ip-here}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-token-auth: {your-token-here}",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
This will result in the following response.
{
"uuid": {your-publish-uuid-here}
"name": "Livestream 01-01-2022",
"description": null,
"date_created": "2022-01-01T01:01:01+00:00",
"date_updated": "2022-01-01T01:01:01+00:00",
"date_started": "2022-01-01T01:01:01+00:00",
"date_ended": null,
"share_url": "https://my.isset.video/livestreams/share/{example-share-key}",
"embed_url": "https://my.isset.video/livestreams/embed/{example-embed-key}",
"playout_url": "https://live.stream.isset.video/{unique-playout-path}",
"publish": "{publish-uuid}"
}
When the livestream has concluded a publish will be create from the livestream. Use the publish field here to retrieve the publish uuid for the livestream. Check the Video Publisher Docs to play this video.