PHP code example of cloudinary / video-live-streaming

1. Go to this page and download the library: Download cloudinary/video-live-streaming library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cloudinary / video-live-streaming example snippets





onfigure Cloudinary URL: basicAuth
$config = Cloudinary\Video\LiveStreaming\Configuration::getDefaultConfiguration()
              ->setCloudinaryUrl('cloudinary://key:secret@cloud_name');

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


Instance = new Cloudinary\Video\LiveStreaming\Api\LiveStreamApi();


Instance = 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;
}