@@ -26,6 +26,15 @@ class OutputModes(Enum):
2626 individual = u ("individual" )
2727 """Each stream in the archive is recorded to an individual file."""
2828
29+ class StreamModes (Enum ):
30+ """"List of valid settings for the stream_mode parameter of the OpenTok.start_archive()
31+ method."""
32+
33+ auto = u ("auto" )
34+ """Streams are automatically added to the archive."""
35+ manual = u ("manual" )
36+ """Streams are included in the archive based on calls to the OpenTok.add_archive_stream()
37+ and OpenTok.remove_archive_stream() methods."""
2938
3039class Archive (object ):
3140 """Represents an archive of an OpenTok session.
@@ -34,7 +43,7 @@ class Archive(object):
3443 The time at which the archive was created, in milliseconds since the UNIX epoch.
3544
3645 :ivar duration:
37- The duration of the archive, in milliseconds .
46+ The duration of the archive, in seconds .
3847
3948 :ivar has_audio:
4049 Boolean value set to true when the archive contains an audio track,
@@ -55,6 +64,14 @@ class Archive(object):
5564 Whether all streams in the archive are recorded to a single file
5665 (OutputModes.composed) or to individual files (OutputModes.individual).
5766
67+ :ivar streamMode:
68+ Whether streams included in the archive are selected automatically
69+ ("auto", the default) or manually ("manual").
70+
71+ :ivar streams:
72+ A list of streams currently being archived. This is only set for an archive with
73+ the status set to "started" and the stream_Mode set to "manual".
74+
5875 :ivar partner_id:
5976 The API key associated with the archive.
6077
@@ -113,6 +130,8 @@ def __init__(self, sdk, values):
113130 self .has_audio = values .get ("hasAudio" )
114131 self .has_video = values .get ("hasVideo" )
115132 self .output_mode = OutputModes [values .get ("outputMode" , "composed" )]
133+ self .stream_mode = values .get ("streamMode" , StreamModes .auto )
134+ self .streams = values .get ("streams" )
116135 self .url = values .get ("url" )
117136 self .resolution = values .get ("resolution" )
118137
0 commit comments