All URIs are relative to https://api.mux.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createLiveStream() | POST /video/v1/live-streams | Create a live stream |
createLiveStreamPlaybackId() | POST /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids | Create a live stream playback ID |
createLiveStreamSimulcastTarget() | POST /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target |
deleteLiveStream() | DELETE /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream |
deleteLiveStreamPlaybackId() | DELETE /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID |
deleteLiveStreamSimulcastTarget() | DELETE /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a live stream simulcast target |
disableLiveStream() | PUT /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream |
enableLiveStream() | PUT /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream |
getLiveStream() | GET /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream |
getLiveStreamPlaybackId() | GET /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID |
getLiveStreamSimulcastTarget() | GET /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a live stream simulcast target |
listLiveStreams() | GET /video/v1/live-streams | List live streams |
resetStreamKey() | POST /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream's stream key |
signalLiveStreamComplete() | PUT /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished |
updateLiveStream() | PATCH /video/v1/live-streams/{LIVE_STREAM_ID} | Update a live stream |
updateLiveStreamEmbeddedSubtitles() | PUT /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles |
updateLiveStreamGeneratedSubtitles() | PUT /video/v1/live-streams/{LIVE_STREAM_ID}/generated-subtitles | Update a live stream's generated subtitles |
createLiveStream($create_live_stream_request): \MuxPhp\Models\LiveStreamResponse
Create a live stream
Creates a new live stream. Once created, an encoder can connect to Mux via the specified stream key and begin streaming to an audience.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
// This API method wants a \MuxPhp\Models\CreateLiveStreamRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\CreateLiveStreamRequest" directly.
$create_live_stream_request = json_decode('{"playback_policy":["public"],"new_asset_settings":{"playback_policy":["public"]}}',true); // \MuxPhp\Models\CreateLiveStreamRequest
try {
$result = $apiInstance->createLiveStream($create_live_stream_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->createLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
create_live_stream_request | \MuxPhp\Models\CreateLiveStreamRequest |
\MuxPhp\Models\LiveStreamResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createLiveStreamPlaybackId($live_stream_id, $create_playback_id_request): \MuxPhp\Models\CreatePlaybackIDResponse
Create a live stream playback ID
Create a new playback ID for this live stream, through which a viewer can watch the streamed content of the live stream.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
// This API method wants a \MuxPhp\Models\CreatePlaybackIDRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\CreatePlaybackIDRequest" directly.
$create_playback_id_request = json_decode('{"policy":"signed"}',true); // \MuxPhp\Models\CreatePlaybackIDRequest
try {
$result = $apiInstance->createLiveStreamPlaybackId($live_stream_id, $create_playback_id_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->createLiveStreamPlaybackId: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
create_playback_id_request | \MuxPhp\Models\CreatePlaybackIDRequest |
\MuxPhp\Models\CreatePlaybackIDResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createLiveStreamSimulcastTarget($live_stream_id, $create_simulcast_target_request): \MuxPhp\Models\SimulcastTargetResponse
Create a live stream simulcast target
Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
// This API method wants a \MuxPhp\Models\CreateSimulcastTargetRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\CreateSimulcastTargetRequest" directly.
$create_simulcast_target_request = json_decode('{"url":"rtmp://live.example.com/app","stream_key":"abcdefgh","passthrough":"Example"}',true); // \MuxPhp\Models\CreateSimulcastTargetRequest
try {
$result = $apiInstance->createLiveStreamSimulcastTarget($live_stream_id, $create_simulcast_target_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->createLiveStreamSimulcastTarget: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
create_simulcast_target_request | \MuxPhp\Models\CreateSimulcastTargetRequest |
\MuxPhp\Models\SimulcastTargetResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLiveStream($live_stream_id)
Delete a live stream
Deletes a live stream from the current environment. If the live stream is currently active and being streamed to, ingest will be terminated and the encoder will be disconnected.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$apiInstance->deleteLiveStream($live_stream_id);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->deleteLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLiveStreamPlaybackId($live_stream_id, $playback_id)
Delete a live stream playback ID
Deletes the playback ID for the live stream. This will not disable ingest (as the live stream still exists). New attempts to play back the live stream will fail immediately. However, current viewers will be able to continue watching the stream for some period of time.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
$playback_id = 'playback_id_example'; // string | The live stream's playback ID.
try {
$apiInstance->deleteLiveStreamPlaybackId($live_stream_id, $playback_id);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->deleteLiveStreamPlaybackId: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
playback_id | string | The live stream's playback ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id)
Delete a live stream simulcast target
Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
$simulcast_target_id = 'simulcast_target_id_example'; // string | The ID of the simulcast target.
try {
$apiInstance->deleteLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->deleteLiveStreamSimulcastTarget: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
simulcast_target_id | string | The ID of the simulcast target. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
disableLiveStream($live_stream_id): \MuxPhp\Models\DisableLiveStreamResponse
Disable a live stream
Disables a live stream, making it reject incoming RTMP streams until re-enabled. The API also ends the live stream recording immediately when active. Ending the live stream recording adds the EXT-X-ENDLIST
tag to the HLS manifest which notifies the player that this live stream is over. Mux also closes the encoder connection immediately. Any attempt from the encoder to re-establish connection will fail till the live stream is re-enabled.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$result = $apiInstance->disableLiveStream($live_stream_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->disableLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
\MuxPhp\Models\DisableLiveStreamResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
enableLiveStream($live_stream_id): \MuxPhp\Models\EnableLiveStreamResponse
Enable a live stream
Enables a live stream, allowing it to accept an incoming RTMP stream.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$result = $apiInstance->enableLiveStream($live_stream_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->enableLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
\MuxPhp\Models\EnableLiveStreamResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLiveStream($live_stream_id): \MuxPhp\Models\LiveStreamResponse
Retrieve a live stream
Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$result = $apiInstance->getLiveStream($live_stream_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->getLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
\MuxPhp\Models\LiveStreamResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLiveStreamPlaybackId($live_stream_id, $playback_id): \MuxPhp\Models\GetLiveStreamPlaybackIDResponse
Retrieve a live stream playback ID
Fetches information about a live stream's playback ID, through which a viewer can watch the streamed content from this live stream.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
$playback_id = 'playback_id_example'; // string | The live stream's playback ID.
try {
$result = $apiInstance->getLiveStreamPlaybackId($live_stream_id, $playback_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->getLiveStreamPlaybackId: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
playback_id | string | The live stream's playback ID. |
\MuxPhp\Models\GetLiveStreamPlaybackIDResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id): \MuxPhp\Models\SimulcastTargetResponse
Retrieve a live stream simulcast target
Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
$simulcast_target_id = 'simulcast_target_id_example'; // string | The ID of the simulcast target.
try {
$result = $apiInstance->getLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->getLiveStreamSimulcastTarget: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
simulcast_target_id | string | The ID of the simulcast target. |
\MuxPhp\Models\SimulcastTargetResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listLiveStreams($limit, $page, $stream_key, $status): \MuxPhp\Models\ListLiveStreamsResponse
List live streams
Lists the live streams that currently exist in the current environment.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 25; // int | Number of items to include in the response
$page = 1; // int | Offset by this many pages, of the size of `limit`
$stream_key = 'stream_key_example'; // string | Filter response to return live stream for this stream key only
$status = new \MuxPhp\Models\\MuxPhp\Models\LiveStreamStatus(); // \MuxPhp\Models\LiveStreamStatus | Filter response to return live streams with the specified status only
try {
$result = $apiInstance->listLiveStreams($limit, $page, $stream_key, $status);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->listLiveStreams: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Number of items to include in the response | [optional] [default to 25] |
page | int | Offset by this many pages, of the size of `limit` | [optional] [default to 1] |
stream_key | string | Filter response to return live stream for this stream key only | [optional] |
status | \MuxPhp\Models\LiveStreamStatus | Filter response to return live streams with the specified status only | [optional] |
\MuxPhp\Models\ListLiveStreamsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
resetStreamKey($live_stream_id): \MuxPhp\Models\LiveStreamResponse
Reset a live stream's stream key
Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$result = $apiInstance->resetStreamKey($live_stream_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->resetStreamKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
\MuxPhp\Models\LiveStreamResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
signalLiveStreamComplete($live_stream_id): \MuxPhp\Models\SignalLiveStreamCompleteResponse
Signal a live stream is finished
(Optional) End the live stream recording immediately instead of waiting for the reconnect_window. EXT-X-ENDLIST
tag is added to the HLS manifest which notifies the player that this live stream is over. Mux does not close the encoder connection immediately. Encoders are often configured to re-establish connections immediately which would result in a new recorded asset. For this reason, Mux waits for 60s before closing the connection with the encoder. This 60s timeframe is meant to give encoder operators a chance to disconnect from their end.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
try {
$result = $apiInstance->signalLiveStreamComplete($live_stream_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->signalLiveStreamComplete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID |
\MuxPhp\Models\SignalLiveStreamCompleteResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateLiveStream($live_stream_id, $update_live_stream_request): \MuxPhp\Models\LiveStreamResponse
Update a live stream
Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
// This API method wants a \MuxPhp\Models\UpdateLiveStreamRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\UpdateLiveStreamRequest" directly.
$update_live_stream_request = json_decode('{"latency_mode":"standard","reconnect_window":30,"max_continuous_duration":1200}',true); // \MuxPhp\Models\UpdateLiveStreamRequest
try {
$result = $apiInstance->updateLiveStream($live_stream_id, $update_live_stream_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->updateLiveStream: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
update_live_stream_request | \MuxPhp\Models\UpdateLiveStreamRequest |
\MuxPhp\Models\LiveStreamResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateLiveStreamEmbeddedSubtitles($live_stream_id, $update_live_stream_embedded_subtitles_request): \MuxPhp\Models\LiveStreamResponse
Update a live stream's embedded subtitles
Configures a live stream to receive embedded closed captions. The resulting Asset's subtitle text track will have closed_captions: true
set.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
// This API method wants a \MuxPhp\Models\UpdateLiveStreamEmbeddedSubtitlesRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\UpdateLiveStreamEmbeddedSubtitlesRequest" directly.
$update_live_stream_embedded_subtitles_request = json_decode('{"embedded_subtitles":[{"passthrough":"Example"}]}',true); // \MuxPhp\Models\UpdateLiveStreamEmbeddedSubtitlesRequest
try {
$result = $apiInstance->updateLiveStreamEmbeddedSubtitles($live_stream_id, $update_live_stream_embedded_subtitles_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->updateLiveStreamEmbeddedSubtitles: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
update_live_stream_embedded_subtitles_request | \MuxPhp\Models\UpdateLiveStreamEmbeddedSubtitlesRequest |
\MuxPhp\Models\LiveStreamResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateLiveStreamGeneratedSubtitles($live_stream_id, $update_live_stream_generated_subtitles_request): \MuxPhp\Models\LiveStreamResponse
Update a live stream's generated subtitles
Updates a live stream's automatic-speech-recognition-generated subtitle configuration. Automatic speech recognition subtitles can be removed by sending an empty array in the request payload.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: accessToken
$config = MuxPhp\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MuxPhp\Api\LiveStreamsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$live_stream_id = 'live_stream_id_example'; // string | The live stream ID
// This API method wants a \MuxPhp\Models\UpdateLiveStreamGeneratedSubtitlesRequest
// as the second parameter. That being said, these API docs are
// auto-generated from our OpenAPI specification, which
// gives us the example parameter as a JSON string. In this example,
// we'll use json_decode() to turn it into an associative array, which
// is compatible with the model.
//
// In your own code you should use an associative array, or
// use a "new \MuxPhp\Models\UpdateLiveStreamGeneratedSubtitlesRequest" directly.
$update_live_stream_generated_subtitles_request = json_decode('{"generated_subtitles":[{"name":"English CC (ASR)","language_code":"en","passthrough":"Example"}]}',true); // \MuxPhp\Models\UpdateLiveStreamGeneratedSubtitlesRequest
try {
$result = $apiInstance->updateLiveStreamGeneratedSubtitles($live_stream_id, $update_live_stream_generated_subtitles_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LiveStreamsApi->updateLiveStreamGeneratedSubtitles: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
live_stream_id | string | The live stream ID | |
update_live_stream_generated_subtitles_request | \MuxPhp\Models\UpdateLiveStreamGeneratedSubtitlesRequest |
\MuxPhp\Models\LiveStreamResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]