Skip to content

Commit d3af00a

Browse files
authored
1.9.0 (#24)
* 1.9.0 Development * Add test coverage
1 parent bdcb2a0 commit d3af00a

23 files changed

+1291
-6
lines changed

docs/Asset.md

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
2323
**mp4_support** | **str** | | [optional] [default to 'none']
2424
**normalize_audio** | **bool** | | [optional] [default to False]
2525
**static_renditions** | [**AssetStaticRenditions**](AssetStaticRenditions.md) | | [optional]
26+
**recording_times** | [**list[AssetRecordingTimes]**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream | [optional]
27+
**non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional]
2628
**test** | **bool** | | [optional]
2729

2830
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/AssetNonStandardInputReasons.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# AssetNonStandardInputReasons
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**video_codec** | **str** | The video codec used on the input file | [optional]
7+
**audio_codec** | **str** | The audio codec used on the input file | [optional]
8+
**video_gop_size** | **str** | The video key frame Interval (also called as Group of Picture or GOP) of the input file | [optional]
9+
**video_frame_rate** | **str** | The video frame rate of the input file | [optional]
10+
**video_resolution** | **str** | The video resolution of the input file | [optional]
11+
**pixel_aspect_ratio** | **str** | The video pixel aspect ratio of the input file | [optional]
12+
**video_edit_list** | **str** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List | [optional]
13+
**audio_edit_list** | **str** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List | [optional]
14+
**unexpected_media_file_parameters** | **str** | A catch-all reason when the input file in created with non-standard encoding parameters | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
18+

docs/AssetRecordingTimes.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AssetRecordingTimes
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**started_at** | **datetime** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format | [optional]
7+
**duration** | **float** | The duration of the live stream recorded. The time value is in seconds | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/DisableLiveStreamResponse.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# DisableLiveStreamResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**data** | [**object**](.md) | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/EnableLiveStreamResponse.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# EnableLiveStreamResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**data** | [**object**](.md) | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/LiveStreamsApi.md

+110
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Method | HTTP request | Description
1010
[**delete_live_stream**](LiveStreamsApi.md#delete_live_stream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream
1111
[**delete_live_stream_playback_id**](LiveStreamsApi.md#delete_live_stream_playback_id) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID
1212
[**delete_live_stream_simulcast_target**](LiveStreamsApi.md#delete_live_stream_simulcast_target) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target
13+
[**disable_live_stream**](LiveStreamsApi.md#disable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream
14+
[**enable_live_stream**](LiveStreamsApi.md#enable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream
1315
[**get_live_stream**](LiveStreamsApi.md#get_live_stream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream
1416
[**get_live_stream_simulcast_target**](LiveStreamsApi.md#get_live_stream_simulcast_target) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target
1517
[**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams
@@ -338,6 +340,114 @@ void (empty response body)
338340

339341
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
340342

343+
# **disable_live_stream**
344+
> DisableLiveStreamResponse disable_live_stream(live_stream_id)
345+
346+
Disable a live stream
347+
348+
Disables a live stream, making it reject incoming RTMP streams until re-enabled.
349+
350+
### Example
351+
352+
* Basic Authentication (accessToken):
353+
```python
354+
from __future__ import print_function
355+
import time
356+
import mux_python
357+
from mux_python.rest import ApiException
358+
from pprint import pprint
359+
configuration = mux_python.Configuration()
360+
# Configure HTTP basic authorization: accessToken
361+
configuration.username = 'YOUR_USERNAME'
362+
configuration.password = 'YOUR_PASSWORD'
363+
364+
# create an instance of the API class
365+
api_instance = mux_python.LiveStreamsApi(mux_python.ApiClient(configuration))
366+
live_stream_id = 'live_stream_id_example' # str | The live stream ID
367+
368+
try:
369+
# Disable a live stream
370+
api_response = api_instance.disable_live_stream(live_stream_id)
371+
pprint(api_response)
372+
except ApiException as e:
373+
print("Exception when calling LiveStreamsApi->disable_live_stream: %s\n" % e)
374+
```
375+
376+
### Parameters
377+
378+
Name | Type | Description | Notes
379+
------------- | ------------- | ------------- | -------------
380+
**live_stream_id** | **str**| The live stream ID |
381+
382+
### Return type
383+
384+
[**DisableLiveStreamResponse**](DisableLiveStreamResponse.md)
385+
386+
### Authorization
387+
388+
[accessToken](../README.md#accessToken)
389+
390+
### HTTP request headers
391+
392+
- **Content-Type**: Not defined
393+
- **Accept**: application/json
394+
395+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
396+
397+
# **enable_live_stream**
398+
> EnableLiveStreamResponse enable_live_stream(live_stream_id)
399+
400+
Enable a live stream
401+
402+
Enables a live stream, allowing it to accept an incoming RTMP stream.
403+
404+
### Example
405+
406+
* Basic Authentication (accessToken):
407+
```python
408+
from __future__ import print_function
409+
import time
410+
import mux_python
411+
from mux_python.rest import ApiException
412+
from pprint import pprint
413+
configuration = mux_python.Configuration()
414+
# Configure HTTP basic authorization: accessToken
415+
configuration.username = 'YOUR_USERNAME'
416+
configuration.password = 'YOUR_PASSWORD'
417+
418+
# create an instance of the API class
419+
api_instance = mux_python.LiveStreamsApi(mux_python.ApiClient(configuration))
420+
live_stream_id = 'live_stream_id_example' # str | The live stream ID
421+
422+
try:
423+
# Enable a live stream
424+
api_response = api_instance.enable_live_stream(live_stream_id)
425+
pprint(api_response)
426+
except ApiException as e:
427+
print("Exception when calling LiveStreamsApi->enable_live_stream: %s\n" % e)
428+
```
429+
430+
### Parameters
431+
432+
Name | Type | Description | Notes
433+
------------- | ------------- | ------------- | -------------
434+
**live_stream_id** | **str**| The live stream ID |
435+
436+
### Return type
437+
438+
[**EnableLiveStreamResponse**](EnableLiveStreamResponse.md)
439+
440+
### Authorization
441+
442+
[accessToken](../README.md#accessToken)
443+
444+
### HTTP request headers
445+
446+
- **Content-Type**: Not defined
447+
- **Accept**: application/json
448+
449+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
450+
341451
# **get_live_stream**
342452
> LiveStreamResponse get_live_stream(live_stream_id)
343453

examples/video/exercise-live-streams.py

+20
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@
100100
sys.exit(1)
101101
print("signal-live-stream-complete OK ✅")
102102

103+
# ========== disable-live-stream ==========
104+
try:
105+
live_api.disable_live_stream(create_live_stream_response.data.id)
106+
except ApiException as e:
107+
print("Should not have errored when disabling live stream ❌ ")
108+
sys.exit(1)
109+
disabled_live_stream = live_api.get_live_stream(create_live_stream_response.data.id)
110+
assert disabled_live_stream.data.status == 'disabled'
111+
print("disable-live-stream OK ✅")
112+
113+
# ========== enable-live-stream ==========
114+
try:
115+
live_api.enable_live_stream(create_live_stream_response.data.id)
116+
except ApiException as e:
117+
print("Should not have errored when enabling live stream ❌ ")
118+
sys.exit(1)
119+
enabled_live_stream = live_api.get_live_stream(create_live_stream_response.data.id)
120+
assert enabled_live_stream.data.status == 'idle'
121+
print("enable-live-stream OK ✅")
122+
103123
# ========== delete-live-stream ==========
104124
live_api.delete_live_stream(create_live_stream_response.data.id)
105125
logger.print_debug("Deleted Live Stream (void response) ")

mux_python/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from __future__ import absolute_import
1313

14-
__version__ = "1.8.0"
14+
__version__ = "1.9.0"
1515

1616
# import apis into sdk package
1717
from mux_python.api.assets_api import AssetsApi
@@ -35,6 +35,8 @@
3535
from mux_python.models.asset import Asset
3636
from mux_python.models.asset_errors import AssetErrors
3737
from mux_python.models.asset_master import AssetMaster
38+
from mux_python.models.asset_non_standard_input_reasons import AssetNonStandardInputReasons
39+
from mux_python.models.asset_recording_times import AssetRecordingTimes
3840
from mux_python.models.asset_response import AssetResponse
3941
from mux_python.models.asset_static_renditions import AssetStaticRenditions
4042
from mux_python.models.asset_static_renditions_files import AssetStaticRenditionsFiles
@@ -48,6 +50,8 @@
4850
from mux_python.models.create_track_response import CreateTrackResponse
4951
from mux_python.models.create_upload_request import CreateUploadRequest
5052
from mux_python.models.delivery_report import DeliveryReport
53+
from mux_python.models.disable_live_stream_response import DisableLiveStreamResponse
54+
from mux_python.models.enable_live_stream_response import EnableLiveStreamResponse
5155
from mux_python.models.error import Error
5256
from mux_python.models.filter_value import FilterValue
5357
from mux_python.models.get_asset_input_info_response import GetAssetInputInfoResponse

0 commit comments

Comments
 (0)