@@ -24,7 +24,7 @@ class Broadcast(object):
24
24
25
25
:ivar resolution:
26
26
The resolution of the broadcast (either "640x480", "1280x720", "1920x1080", "480x640", "720x1280", or "1920x1080").
27
-
27
+
28
28
:ivar status:
29
29
The status of the broadcast.
30
30
@@ -34,29 +34,36 @@ class Broadcast(object):
34
34
:ivar hasVideo:
35
35
Whether the broadcast has video.
36
36
37
+ :ivar 'maxBitrate' optional:
38
+ The maximum bitrate (bits per second) used by the broadcast.
39
+
37
40
:ivar broadcastUrls:
38
41
An object containing details about the HLS and RTMP broadcasts.
39
-
40
- If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast.
41
- Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs
42
+
43
+ If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast.
44
+ Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs
42
45
to .ts media segment files (MPEG-2 transport stream files).
43
46
While the URLs of both the playlist index file and media segment files are provided as soon as the HTTP response
44
- is returned, these URLs should not be accessed until 15 - 20 seconds later,
45
- after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams
46
- in the OpenTok session.
47
- See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index
47
+ is returned, these URLs should not be accessed until 15 - 20 seconds later,
48
+ after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams
49
+ in the OpenTok session.
50
+ See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index
48
51
file and media segment files for HLS.
49
52
50
- If you specified RTMP stream endpoints, the object includes an rtmp property.
51
- This is an array of objects that include information on each of the RTMP streams.
52
- Each of these objects has the following properties: id (the ID you assigned to the RTMP stream),
53
- serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting").
54
- You can call the OpenTok REST method to check for status updates for the broadcast:
53
+ If you specified an HLS endpoint, the object will also include an "hlsStatus" property with
54
+ information about the HLS broadcast. This will have one of the following values:
55
+ ["connecting", "ready", "live", "ended", "error"].
56
+
57
+ If you specified RTMP stream endpoints, the object includes an rtmp property.
58
+ This is an array of objects that include information on each of the RTMP streams.
59
+ Each of these objects has the following properties: id (the ID you assigned to the RTMP stream),
60
+ serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting").
61
+ You can call the OpenTok REST method to check for status updates for the broadcast:
55
62
https://tokbox.com/developer/rest/#get_info_broadcast
56
63
57
64
:ivar streamMode:
58
65
Whether streams included in the broadcast are selected automatically
59
- ("auto", the default) or manually ("manual").
66
+ ("auto", the default) or manually ("manual").
60
67
61
68
:ivar streams:
62
69
A list of streams currently being broadcasted. This is only set for a broadcast with
@@ -71,6 +78,8 @@ def __init__(self, kwargs):
71
78
self .updatedAt = kwargs .get ("updatedAt" )
72
79
self .hasAudio = kwargs .get ("hasAudio" )
73
80
self .hasVideo = kwargs .get ("hasVideo" )
81
+ self .maxBitrate = kwargs .get ("maxBitrate" )
82
+ self .maxDuration = kwargs .get ("maxDuration" )
74
83
self .resolution = kwargs .get ("resolution" )
75
84
self .status = kwargs .get ("status" )
76
85
self .broadcastUrls = kwargs .get ("broadcastUrls" )
@@ -83,8 +92,9 @@ def json(self):
83
92
"""
84
93
return json .dumps (self , default = lambda o : o .__dict__ , sort_keys = True , indent = 4 )
85
94
95
+
86
96
class BroadcastStreamModes (Enum ):
87
- """"List of valid settings for the stream_mode parameter of the OpenTok.start_broadcast()
97
+ """ "List of valid settings for the stream_mode parameter of the OpenTok.start_broadcast()
88
98
method."""
89
99
90
100
auto = u ("auto" )
0 commit comments