Skip to content

Latest commit

 

History

History
628 lines (421 loc) · 18.2 KB

LiveStreamApi.md

File metadata and controls

628 lines (421 loc) · 18.2 KB

Cloudinary\Video\LiveStreaming\LiveStreamApi

All URIs are relative to https://api.cloudinary.com/v2/CLOUD_NAME/video, except if the operation defines another base path.

Method HTTP request Description
activateLiveStream() POST /live_streams/{liveStreamId}/activate Manually activate a live stream
createLiveStream() POST /live_streams Create a new live stream
createLiveStreamOutput() POST /live_streams/{liveStreamId}/outputs Create a new live stream output
deleteLiveStream() DELETE /live_streams/{liveStreamId} Delete a live stream
deleteLiveStreamOutput() DELETE /live_streams/{liveStreamId}/outputs/{liveStreamOutputId} Delete a live stream output
getLiveStream() GET /live_streams/{liveStreamId} Get a single live stream
getLiveStreamOutput() GET /live_streams/{liveStreamId}/outputs/{liveStreamOutputId} Get a single live stream output
getLiveStreamOutputs() GET /live_streams/{liveStreamId}/outputs Get a list of live stream outputs
getLiveStreams() GET /live_streams Get a list of live streams
idleLiveStream() POST /live_streams/{liveStreamId}/idle Manually idle a live stream
updateLiveStream() PATCH /live_streams/{liveStreamId} Update a live stream
updateLiveStreamOutput() PATCH /live_streams/{liveStreamId}/outputs/{liveStreamOutputId} Update a live stream output

activateLiveStream()

activateLiveStream($liveStreamId): \Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Manually activate a live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id

try {
    $result = $apiInstance->activateLiveStream($liveStreamId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->activateLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id

Return type

\Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createLiveStream()

createLiveStream($liveStreamCreatePayload): \Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Create a new live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamCreatePayload = new \Cloudinary\Video\LiveStreaming\Model\LiveStreamCreatePayload(); // \Cloudinary\Video\LiveStreaming\Model\LiveStreamCreatePayload

try {
    $result = $apiInstance->createLiveStream($liveStreamCreatePayload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->createLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamCreatePayload \Cloudinary\Video\LiveStreaming\Model\LiveStreamCreatePayload [optional]

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createLiveStreamOutput()

createLiveStreamOutput($liveStreamId, $liveStreamOutputCreatePayload): \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Create a new live stream output

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id
$liveStreamOutputCreatePayload = {"name":"new youtube","type":"simulcast","uri":"rtmp://a.rtmp.youtube.com/live2","stream_key":"43q7qmah2e1p83jhfpbs","vendor":"youtube"}; // \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputCreatePayload

try {
    $result = $apiInstance->createLiveStreamOutput($liveStreamId, $liveStreamOutputCreatePayload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->createLiveStreamOutput: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id
liveStreamOutputCreatePayload \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputCreatePayload [optional]

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteLiveStream()

deleteLiveStream($liveStreamId): \Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Delete a live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id

try {
    $result = $apiInstance->deleteLiveStream($liveStreamId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->deleteLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id

Return type

\Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteLiveStreamOutput()

deleteLiveStreamOutput($liveStreamId, $liveStreamOutputId): \Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Delete a live stream output

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id
$liveStreamOutputId = "&#39;liveStreamOutputId_example&#39;"; // string | live stream output id

try {
    $result = $apiInstance->deleteLiveStreamOutput($liveStreamId, $liveStreamOutputId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->deleteLiveStreamOutput: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id
liveStreamOutputId string live stream output id

Return type

\Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getLiveStream()

getLiveStream($liveStreamId): \Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Get a single live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id

try {
    $result = $apiInstance->getLiveStream($liveStreamId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->getLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getLiveStreamOutput()

getLiveStreamOutput($liveStreamId, $liveStreamOutputId): \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Get a single live stream output

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id
$liveStreamOutputId = "&#39;liveStreamOutputId_example&#39;"; // string | live stream output id

try {
    $result = $apiInstance->getLiveStreamOutput($liveStreamId, $liveStreamOutputId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->getLiveStreamOutput: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id
liveStreamOutputId string live stream output id

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getLiveStreamOutputs()

getLiveStreamOutputs($liveStreamId): \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputsWrappedResponse

Get a list of live stream outputs

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id

try {
    $result = $apiInstance->getLiveStreamOutputs($liveStreamId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->getLiveStreamOutputs: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputsWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getLiveStreams()

getLiveStreams(): \Cloudinary\Video\LiveStreaming\Model\LiveStreamsWrappedResponse

Get a list of live streams

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();


try {
    $result = $apiInstance->getLiveStreams();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->getLiveStreams: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamsWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

idleLiveStream()

idleLiveStream($liveStreamId): \Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Manually idle a live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id

try {
    $result = $apiInstance->idleLiveStream($liveStreamId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->idleLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id

Return type

\Cloudinary\Video\LiveStreaming\Model\MessageWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateLiveStream()

updateLiveStream($liveStreamId, $liveStreamUpdatePayload): \Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Update a live stream

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id
$liveStreamUpdatePayload = new \Cloudinary\Video\LiveStreaming\Model\LiveStreamUpdatePayload(); // \Cloudinary\Video\LiveStreaming\Model\LiveStreamUpdatePayload

try {
    $result = $apiInstance->updateLiveStream($liveStreamId, $liveStreamUpdatePayload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->updateLiveStream: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id
liveStreamUpdatePayload \Cloudinary\Video\LiveStreaming\Model\LiveStreamUpdatePayload [optional]

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateLiveStreamOutput()

updateLiveStreamOutput($liveStreamId, $liveStreamOutputId, $liveStreamOutputUpdatePayload): \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Update a live stream output

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();

$liveStreamId = "&#39;liveStreamId_example&#39;"; // string | live stream id
$liveStreamOutputId = "&#39;liveStreamOutputId_example&#39;"; // string | live stream output id
$liveStreamOutputUpdatePayload = {"name":"new youtube","type":"simulcast","uri":"rtmp://a.rtmp.youtube.com/live2","stream_key":"43q7qmah2e1p83jhfpbs","vendor":"youtube"}; // \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputUpdatePayload

try {
    $result = $apiInstance->updateLiveStreamOutput($liveStreamId, $liveStreamOutputId, $liveStreamOutputUpdatePayload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LiveStreamApi->updateLiveStreamOutput: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
liveStreamId string live stream id
liveStreamOutputId string live stream output id
liveStreamOutputUpdatePayload \Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputUpdatePayload [optional]

Return type

\Cloudinary\Video\LiveStreaming\Model\LiveStreamOutputWrappedResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]