media_info_controller = client.media_info
MediaInfoController
- Close Live Stream
- Get Bitrate Test Bytes
- Get Playback Info
- Get Posted Playback Info
- Open Live Stream
Closes a media source.
def close_live_stream(self,
live_stream_id)
Parameter | Type | Tags | Description |
---|---|---|---|
live_stream_id |
string |
Query, Required | The livestream id. |
void
live_stream_id = 'liveStreamId2'
result = media_info_controller.close_live_stream(live_stream_id)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |
Tests the network with a request with the size of the bitrate.
def get_bitrate_test_bytes(self,
size=102400)
Parameter | Type | Tags | Description |
---|---|---|---|
size |
int |
Query, Optional | The bitrate. Defaults to 102400. Default: 102400 Constraints: >= 1 , <= 100000000 |
binary
size = 102400
result = media_info_controller.get_bitrate_test_bytes(size)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |
Gets live playback media info for an item.
def get_playback_info(self,
item_id,
user_id)
Parameter | Type | Tags | Description |
---|---|---|---|
item_id |
uuid|string |
Template, Required | The item id. |
user_id |
uuid|string |
Query, Required | The user id. |
item_id = '0000130e-0000-0000-0000-000000000000'
user_id = '000013ec-0000-0000-0000-000000000000'
result = media_info_controller.get_playback_info(item_id, user_id)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |
For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete.
def get_posted_playback_info(self,
item_id,
user_id=None,
max_streaming_bitrate=None,
start_time_ticks=None,
audio_stream_index=None,
subtitle_stream_index=None,
max_audio_channels=None,
media_source_id=None,
live_stream_id=None,
auto_open_live_stream=None,
enable_direct_play=None,
enable_direct_stream=None,
enable_transcoding=None,
allow_video_stream_copy=None,
allow_audio_stream_copy=None,
body=None)
Parameter | Type | Tags | Description |
---|---|---|---|
item_id |
uuid|string |
Template, Required | The item id. |
user_id |
uuid|string |
Query, Optional | The user id. |
max_streaming_bitrate |
int |
Query, Optional | The maximum streaming bitrate. |
start_time_ticks |
long|int |
Query, Optional | The start time in ticks. |
audio_stream_index |
int |
Query, Optional | The audio stream index. |
subtitle_stream_index |
int |
Query, Optional | The subtitle stream index. |
max_audio_channels |
int |
Query, Optional | The maximum number of audio channels. |
media_source_id |
string |
Query, Optional | The media source id. |
live_stream_id |
string |
Query, Optional | The livestream id. |
auto_open_live_stream |
bool |
Query, Optional | Whether to auto open the livestream. |
enable_direct_play |
bool |
Query, Optional | Whether to enable direct play. Default: true. |
enable_direct_stream |
bool |
Query, Optional | Whether to enable direct stream. Default: true. |
enable_transcoding |
bool |
Query, Optional | Whether to enable transcoding. Default: true. |
allow_video_stream_copy |
bool |
Query, Optional | Whether to allow to copy the video stream. Default: true. |
allow_audio_stream_copy |
bool |
Query, Optional | Whether to allow to copy the audio stream. Default: true. |
body |
PlaybackInfoDto |
Body, Optional | The playback info. |
item_id = '0000130e-0000-0000-0000-000000000000'
result = media_info_controller.get_posted_playback_info(item_id)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |
Opens a media source.
def open_live_stream(self,
open_token=None,
user_id=None,
play_session_id=None,
max_streaming_bitrate=None,
start_time_ticks=None,
audio_stream_index=None,
subtitle_stream_index=None,
max_audio_channels=None,
item_id=None,
enable_direct_play=None,
enable_direct_stream=None,
body=None)
Parameter | Type | Tags | Description |
---|---|---|---|
open_token |
string |
Query, Optional | The open token. |
user_id |
uuid|string |
Query, Optional | The user id. |
play_session_id |
string |
Query, Optional | The play session id. |
max_streaming_bitrate |
int |
Query, Optional | The maximum streaming bitrate. |
start_time_ticks |
long|int |
Query, Optional | The start time in ticks. |
audio_stream_index |
int |
Query, Optional | The audio stream index. |
subtitle_stream_index |
int |
Query, Optional | The subtitle stream index. |
max_audio_channels |
int |
Query, Optional | The maximum number of audio channels. |
item_id |
uuid|string |
Query, Optional | The item id. |
enable_direct_play |
bool |
Query, Optional | Whether to enable direct play. Default: true. |
enable_direct_stream |
bool |
Query, Optional | Whether to enable direct stream. Default: true. |
body |
OpenLiveStreamDto |
Body, Optional | The open live stream dto. |
result = media_info_controller.open_live_stream()
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |