@@ -42,7 +42,8 @@ class MediaModes(Enum):
42
42
their streams will be relayed using the OpenTok TURN Server."""
43
43
44
44
class ArchiveModes (Enum ):
45
- """List of valid settings for the archiveMode parameter of the OpenTok.createSession() method."""
45
+ """List of valid settings for the archive_mode parameter of the OpenTok.createSession()
46
+ method."""
46
47
manual = u ('manual' )
47
48
"""The session will be manually archived."""
48
49
always = u ('always' )
@@ -172,21 +173,21 @@ def create_session(self, location=None, media_mode=MediaModes.relayed, archive_m
172
173
Calling this method results in an OpenTokException in the event of an error.
173
174
Check the error message for details.
174
175
175
- You can also create a session using the OpenTok REST API (see
176
- http ://www. tokbox.com/opentok/api/#session_id_production) or the OpenTok dashboard
177
- (see https://dashboard.tokbox.com/projects) .
176
+ You can also create a session using the OpenTok
177
+ `REST API <https ://tokbox.com/opentok/api/#session_id_production>`_ or
178
+ `the OpenTok dashboard < https://dashboard.tokbox.com/projects>`_ .
178
179
179
- :param String mediaMode : Determines whether the session will transmit streams using the
180
+ :param String media_mode : Determines whether the session will transmit streams using the
180
181
OpenTok Media Router (MediaMode.routed) or not (MediaMode.relayed). By default,
181
182
the setting is MediaMode.relayed.
182
183
183
- With the mediaMode property set to MediaMode.relayed, the session
184
+ With the media_mode property set to MediaMode.relayed, the session
184
185
will attempt to transmit streams directly between clients. If clients cannot connect
185
186
due to firewall restrictions, the session uses the OpenTok TURN server to relay
186
187
audio-video streams.
187
188
188
- The OpenTok Media Router (see
189
- https://tokbox.com/opentok/tutorials/create-session/#media-mode)
189
+ The ` OpenTok Media
190
+ Router < https://tokbox.com/opentok/tutorials/create-session/#media-mode>`_
190
191
provides the following benefits:
191
192
192
193
* The OpenTok Media Router can decrease bandwidth usage in multiparty sessions.
@@ -203,12 +204,12 @@ def create_session(self, location=None, media_mode=MediaModes.relayed, archive_m
203
204
* The OpenTok Media Router supports the archiving feature, which lets
204
205
you record, save, and retrieve OpenTok sessions (see http://tokbox.com/platform/archiving).
205
206
206
- :param String archiveMode : Whether the session is automatically archived
207
- (ArchiveMode .always) or not (ArchiveMode .manual). By default,
208
- the setting is ArchiveMode .manual, and you must call the
209
- start_archive() method of the OpenTok object to start archiving. To archive the session
210
- (either automatically or not), you must set the mediaMode parameter to
211
- MediaMode .routed.
207
+ :param String archive_mode : Whether the session is automatically archived
208
+ (ArchiveModes .always) or not (ArchiveModes .manual). By default,
209
+ the setting is ArchiveModes .manual, and you must call the
210
+ start_archive() method of the OpenTok object to start archiving. To archive the session
211
+ (either automatically or not), you must set the media_mode parameter to
212
+ MediaModes .routed.
212
213
213
214
:param String location: An IP address that the OpenTok servers will use to
214
215
situate the session in its global network. If you do not set a location hint,
@@ -285,29 +286,31 @@ def archive_url(self, archive_id=None):
285
286
286
287
def start_archive (self , session_id , has_audio = True , has_video = True , name = None , output_mode = OutputModes .composed ):
287
288
"""
288
- Starts archiving an OpenTok 2.0 session.
289
+ Starts archiving an OpenTok session.
289
290
290
291
Clients must be actively connected to the OpenTok session for you to successfully start
291
292
recording an archive.
292
293
293
294
You can only record one archive at a time for a given session. You can only record archives
294
- of sessions that use the OpenTok Media Router (sessions witht the media mode set to routed);
295
- you cannot archive sessions witht the media mode set to relayed.
295
+ of sessions that use the OpenTok Media Router (sessions with the media mode set to routed);
296
+ you cannot archive sessions with the media mode set to relayed.
297
+
298
+ For more information on archiving, see the
299
+ `OpenTok archiving <https://tokbox.com/opentok/tutorials/archiving/>`_ programming guide.
296
300
297
301
:param String session_id: The session ID of the OpenTok session to archive.
298
302
:param String name: This is the name of the archive. You can use this name
299
303
to identify the archive. It is a property of the Archive object, and it is a property
300
304
of archive-related events in the OpenTok.js library.
301
- :param Boolean hasAudio : if set to True, an audio track will be inserted to the archive.
302
- hasAudio is an optional parameter that is set to True by default. If you set both
303
- hasAudio and hasVideo to False, the call to the start_archive() method results in
305
+ :param Boolean has_audio : if set to True, an audio track will be inserted to the archive.
306
+ has_audio is an optional parameter that is set to True by default. If you set both
307
+ has_audio and has_video to False, the call to the start_archive() method results in
304
308
an error.
305
- :param Boolean hasVideo: if set to True, a video track will be inserted to the archive.
306
- hasVideo is an optional parameter that is set to True by default.
307
- :param OutputModes outputMode: if set to composed, a single MP4 file composed of all streams
308
- will be generated. If you set it to individual it will create a ZIP container with multiple
309
- individual WEBM files and a JSON metadata file for video synchronization.
310
- outputMode is an optional parameter that is set to composed by default.
309
+ :param Boolean has_video: if set to True, a video track will be inserted to the archive.
310
+ has_video is an optional parameter that is set to True by default.
311
+ :param OutputModes output_mode: Whether all streams in the archive are recorded
312
+ to a single file (OutputModes.composed, the default) or to individual files
313
+ (OutputModes.individual).
311
314
312
315
:rtype: The Archive object, which includes properties defining the archive,
313
316
including the archive ID.
0 commit comments