opentok 2.2.4 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -17
  3. data/doc/OpenTok.html +20 -13
  4. data/doc/OpenTok/Archive.html +350 -68
  5. data/doc/OpenTok/ArchiveList.html +3 -3
  6. data/doc/OpenTok/Archives.html +114 -42
  7. data/doc/OpenTok/HashExtensions.html +184 -0
  8. data/doc/OpenTok/OpenTok.html +89 -44
  9. data/doc/OpenTok/OpenTokArchiveError.html +3 -3
  10. data/doc/OpenTok/OpenTokAuthenticationError.html +3 -3
  11. data/doc/OpenTok/OpenTokError.html +3 -3
  12. data/doc/OpenTok/Session.html +116 -24
  13. data/doc/_index.html +22 -7
  14. data/doc/class_list.html +6 -2
  15. data/doc/file.README.html +3 -3
  16. data/doc/file_list.html +5 -1
  17. data/doc/frames.html +1 -1
  18. data/doc/index.html +3 -3
  19. data/doc/js/full_list.js +4 -1
  20. data/doc/method_list.html +45 -11
  21. data/doc/top-level-namespace.html +3 -3
  22. data/lib/extensions/hash.rb +12 -0
  23. data/lib/opentok/archive.rb +22 -2
  24. data/lib/opentok/archives.rb +33 -6
  25. data/lib/opentok/client.rb +21 -4
  26. data/lib/opentok/constants.rb +1 -0
  27. data/lib/opentok/opentok.rb +25 -13
  28. data/lib/opentok/session.rb +6 -3
  29. data/lib/opentok/version.rb +1 -1
  30. data/sample/Archiving/README.md +16 -10
  31. data/sample/Archiving/archiving_sample.rb +6 -3
  32. data/sample/Archiving/public/js/host.js +25 -12
  33. data/sample/Archiving/views/host.erb +24 -0
  34. data/sample/HelloWorld/README.md +1 -1
  35. data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +1 -1
  36. data/spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml +50 -0
  37. data/spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml +51 -0
  38. data/spec/cassettes/OpenTok_Archives/should_find_paused_archives_by_id.yml +46 -0
  39. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml +39 -0
  40. data/spec/opentok/archives_spec.rb +32 -0
  41. data/spec/opentok/opentok_spec.rb +27 -3
  42. data/spec/spec_helper.rb +1 -0
  43. metadata +36 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cee4e37d52a813e5b61449188d03d0a679ab00a
4
- data.tar.gz: bcfd00abc717c38236c0358375616c1947d35698
3
+ metadata.gz: 3c7ab13d69f3ada792acd0b12de334447a368562
4
+ data.tar.gz: 486244b6bc125f6ff67bc6057c50627905705210
5
5
  SHA512:
6
- metadata.gz: 85739d5bb678e7af843692b30ace91d862552a8b749031bd35991415a9b0cf806d0daf79a381e03558baec66ff10071e012400294595df31fa88692a04c7e2f7
7
- data.tar.gz: a85cdc9408a6df9babe9507ba71c001eae8c7a37de6a41211a0e96473b3ee0da1df25cce92e4aa292f914e6a3a37aed90f22bfdaab16847f5606df29b148b6b7
6
+ metadata.gz: 470a8d8ca01f754f8c73370173f73d1a83908aee2220fd19970a5ad3e1172212cad967413c230d40699bd0edd443e4afd0bc8847abc2c56cfad143bed229466a
7
+ data.tar.gz: 7d1382c8466a7b03411186904c2b3f6c7de085bff320d3bb14afbd0ad3b1163b148fa6edfada9d25dcb3670a9a77b4ef89f30a6c03e118915fa47776c7e0b027
data/README.md CHANGED
@@ -6,10 +6,7 @@ The OpenTok Ruby SDK lets you generate
6
6
  [sessions](http://www.tokbox.com/opentok/tutorials/create-session/) and
7
7
  [tokens](http://www.tokbox.com/opentok/tutorials/create-token/) for
8
8
  [OpenTok](http://www.tokbox.com/) applications, and
9
- [archive](http://www.tokbox.com/platform/archiving) OpenTok 2.0 sessions.
10
-
11
- If you are updating from a previous version of this SDK, see
12
- [Important changes since v2.2.0](#important-changes-since-v220).
9
+ [archive](https://tokbox.com/opentok/tutorials/archiving) OpenTok sessions.
13
10
 
14
11
  # Installation
15
12
 
@@ -20,7 +17,7 @@ Bundler helps manage dependencies for Ruby projects. Find more info here: <http:
20
17
  Add this gem to your `Gemfile`:
21
18
 
22
19
  ```ruby
23
- gem "opentok", "~> 2.2"
20
+ gem "opentok", "~> 2.3"
24
21
  ```
25
22
 
26
23
  Allow bundler to install the change.
@@ -32,7 +29,7 @@ $ bundle install
32
29
  ## RubyGems:
33
30
 
34
31
  ```
35
- $ gem install opentok -v 2.2.2
32
+ $ gem install opentok -v 2.2.4
36
33
  ```
37
34
 
38
35
  # Usage
@@ -50,10 +47,11 @@ opentok = OpenTok::OpenTok.new api_key, api_secret
50
47
 
51
48
  ## Creating Sessions
52
49
 
53
- To create an OpenTok Session, use the `OpenTok.create_session(properties)` method. The
54
- `properties` parameter is an optional Hash used to specify whether you are creating a p2p Session
55
- and specifying a location hint. The `session_id` method of the returned `OpenTok::Session`
56
- instance is useful to get a sessionId that can be saved to a persistent store (e.g. database).
50
+ To create an OpenTok Session, use the `OpenTok#create_session(properties)` method. The
51
+ `properties` parameter is an optional Hash used to specify whether you are creating a session that
52
+ uses the OpenTok Media Server and specifying a location hint. The `session_id` method of the
53
+ returned `OpenTok::Session` instance is useful to get a sessionId that can be saved to a persistent
54
+ store (e.g. database).
57
55
 
58
56
  ```ruby
59
57
  # Create a session that will attempt to transmit streams directly between clients.
@@ -66,6 +64,9 @@ session = opentok.create_session :media_mode => :routed
66
64
  # A session with a location hint:
67
65
  session = opentok.create_session :location => '12.34.56.78'
68
66
 
67
+ # A session with automatic archiving (must use the routed media mode):
68
+ session = opentok.create_session :archive_mode => :always, :media_mode => :routed
69
+
69
70
  # Store this sessionId in the database for later use:
70
71
  session_id = session.session_id
71
72
  ```
@@ -74,7 +75,7 @@ session_id = session.session_id
74
75
 
75
76
  Once a Session is created, you can start generating Tokens for clients to use when connecting to it.
76
77
  You can generate a token either by calling the `opentok.generate_token(session_id, options)` method,
77
- or by calling the `session.generate_token(options)` method on the an instance after creating it. The
78
+ or by calling the `Session#generate_token(options)` method on the an instance after creating it. The
78
79
  `options` parameter is an optional Hash used to set the role, expire time, and connection data of
79
80
  the Token.
80
81
 
@@ -97,22 +98,40 @@ token = session.generate_token({
97
98
 
98
99
  You can start the recording of an OpenTok Session using the `opentok.archives.create(session_id,
99
100
  options)` method. This will return an `OpenTok::Archive` instance. The parameter `options` is an
100
- optional Hash used to assign a name for the Archive. Note that you can only start an
101
- Archive on a Session that has clients connected.
101
+ optional Hash used to set the `has_audio`, `has_video`, and `name` options. Note that you can
102
+ only start an Archive on a Session that has clients connected.
102
103
 
103
104
  ```ruby
105
+ # Create an Archive
106
+ archive = opentok.archives.create session_id
107
+
108
+ # Create a named Archive
104
109
  archive = opentok.archives.create session_id :name => "Important Presentation"
105
110
 
111
+ # Create an audio-only Archive
112
+ archive = opentok.archives.create session_id :has_video => false
113
+
106
114
  # Store this archive_id in the database for later use
107
115
  archive_id = archive.id
108
116
  ```
109
117
 
118
+ Setting the `:output_mode` option to `:individual` setting causes each stream in the archive
119
+ to be recorded to its own individual file:
120
+
121
+ ```ruby
122
+ archive = opentok.archives.create session_id :output_mode => :individual
123
+ ```
124
+
125
+ The `:output_mode => :composed` setting (the default) causes all streams in the archive to be
126
+ recorded to a single (composed) file.
127
+
110
128
  You can stop the recording of a started Archive using the `opentok.archives.stop_by_id(archive_id)`
111
- method. You can also do this using the `archive.stop` method of the `OpenTok::Archive` instance.
129
+ method. You can also do this using the `Archive#stop()` method.
112
130
 
113
131
  ```ruby
114
132
  # Stop an Archive from an archive_id (fetched from database)
115
133
  opentok.archives.stop_by_id archive_id
134
+
116
135
  # Stop an Archive from an instance (returned from opentok.archives.create)
117
136
  archive.stop
118
137
  ```
@@ -130,6 +149,7 @@ To delete an Archive, you can call the `opentok.archives.delete_by_id(archive_id
130
149
  ```ruby
131
150
  # Delete an Archive from an archive_id (fetched from database)
132
151
  opentok.archives.delete_by_id archive_id
152
+
133
153
  # Delete an Archive from an Archive instance (returned from archives.create, archives.find)
134
154
  archive.delete
135
155
  ```
@@ -144,10 +164,18 @@ archive_list = opentok.archives.all
144
164
 
145
165
  # Get an specific Archive from the list
146
166
  archive_list[i]
167
+
147
168
  # Get the total number of Archives for this API Key
148
169
  $total = archive_list.total
149
170
  ```
150
171
 
172
+ Note that you can also create an automatically archived session, by passing in `:always`
173
+ as the `:archive_mode` property of the `options` parameter passed into the
174
+ `OpenTok#create_session()` method (see "Creating Sessions," above).
175
+
176
+ For more information on archiving, see the
177
+ [OpenTok archiving](https://tokbox.com/opentok/tutorials/archiving/) programming guide.
178
+
151
179
  # Samples
152
180
 
153
181
  There are two sample applications included in this repository. To get going as fast as possible, clone the whole
@@ -184,8 +212,7 @@ session uses the OpenTok TURN server to relay audio-video streams.
184
212
 
185
213
  **Changes in v2.2.0:**
186
214
 
187
- This version of the SDK includes support for working with OpenTok 2.0 archives. (This API does not
188
- work with OpenTok 1.0 archives.)
215
+ This version of the SDK includes support for working with OpenTok archives.
189
216
 
190
217
  Note also that the `options` parameter of the `OpenTok.create_session()` method has a `media_mode`
191
218
  property instead of a `p2p` property.
@@ -202,7 +229,7 @@ Interested in contributing? We :heart: pull requests! See the [Development](DEVE
202
229
 
203
230
  # Support
204
231
 
205
- See <http://tokbox.com/opentok/support/> for all our support options.
232
+ See <https://support.tokbox.com> for all our support options.
206
233
 
207
234
  Find a bug? File it on the [Issues](https://github.com/opentok/opentok-ruby-sdk/issues) page. Hint:
208
235
  test cases are really helpful!
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: OpenTok
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -80,7 +80,7 @@
80
80
 
81
81
  <dt class="r1 last">Defined in:</dt>
82
82
  <dd class="r1 last">lib/opentok.rb<span class="defines">,<br />
83
- lib/opentok/client.rb,<br /> lib/opentok/session.rb,<br /> lib/opentok/version.rb,<br /> lib/opentok/opentok.rb,<br /> lib/opentok/archive.rb,<br /> lib/opentok/archives.rb,<br /> lib/opentok/constants.rb,<br /> lib/opentok/exceptions.rb,<br /> lib/opentok/archive_list.rb,<br /> lib/opentok/token_generator.rb</span>
83
+ lib/opentok/client.rb,<br /> lib/opentok/session.rb,<br /> lib/opentok/version.rb,<br /> lib/opentok/archive.rb,<br /> lib/opentok/opentok.rb,<br /> lib/extensions/hash.rb,<br /> lib/opentok/archives.rb,<br /> lib/opentok/constants.rb,<br /> lib/opentok/exceptions.rb,<br /> lib/opentok/archive_list.rb,<br /> lib/opentok/token_generator.rb</span>
84
84
  </dd>
85
85
 
86
86
  </dl>
@@ -101,6 +101,8 @@
101
101
  <p class="children">
102
102
 
103
103
 
104
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="OpenTok/HashExtensions.html" title="OpenTok::HashExtensions (module)">HashExtensions</a></span>
105
+
104
106
 
105
107
 
106
108
  <strong class="classes">Classes:</strong> <span class='object_link'><a href="OpenTok/Archive.html" title="OpenTok::Archive (class)">Archive</a></span>, <span class='object_link'><a href="OpenTok/ArchiveList.html" title="OpenTok::ArchiveList (class)">ArchiveList</a></span>, <span class='object_link'><a href="OpenTok/Archives.html" title="OpenTok::Archives (class)">Archives</a></span>, <span class='object_link'><a href="OpenTok/OpenTok.html" title="OpenTok::OpenTok (class)">OpenTok</a></span>, <span class='object_link'><a href="OpenTok/OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span>, <span class='object_link'><a href="OpenTok/OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span>, <span class='object_link'><a href="OpenTok/OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span>, <span class='object_link'><a href="OpenTok/Session.html" title="OpenTok::Session (class)">Session</a></span>
@@ -127,6 +129,11 @@
127
129
  </dt>
128
130
  <dd><pre class="code"><span class='lbrace'>{</span> <span class='label'>subscriber:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>subscriber</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>publisher:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>publisher</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>moderator:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>moderator</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span></pre></dd>
129
131
 
132
+ <dt id="ARCHIVE_MODES-constant" class="">ARCHIVE_MODES =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:manual</span><span class='comma'>,</span> <span class='symbol'>:always</span><span class='rbracket'>]</span><span class='rparen'>)</span></pre></dd>
136
+
130
137
  </dl>
131
138
 
132
139
 
@@ -200,7 +207,7 @@
200
207
 
201
208
  <li>
202
209
 
203
- <span class='name'>sessioin_id</span>
210
+ <span class='name'>session_id</span>
204
211
 
205
212
 
206
213
  <span class='type'>(<tt>String</tt>)</span>
@@ -240,7 +247,7 @@
240
247
 
241
248
  <li>
242
249
  <span class="name">:role</span>
243
- <span class="type">(<tt>String</tt>)</span>
250
+ <span class="type">(<tt>Symbol</tt>)</span>
244
251
  <span class="default">
245
252
 
246
253
  </span>
@@ -322,9 +329,6 @@ cannot be updated once it is set.</p>
322
329
  <pre class="lines">
323
330
 
324
331
 
325
- 43
326
- 44
327
- 45
328
332
  46
329
333
  47
330
334
  48
@@ -354,10 +358,13 @@ cannot be updated once it is set.</p>
354
358
  72
355
359
  73
356
360
  74
357
- 75</pre>
361
+ 75
362
+ 76
363
+ 77
364
+ 78</pre>
358
365
  </td>
359
366
  <td>
360
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
367
+ <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
361
368
 
362
369
  <span class='kw'>class</span> <span class='const'>Session</span>
363
370
 
@@ -368,7 +375,7 @@ cannot be updated once it is set.</p>
368
375
  <span class='symbol'>:session_id</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_session_id'>session_id</span> <span class='rbrace'>}</span>
369
376
  <span class='rbrace'>}</span><span class='rparen'>)</span>
370
377
 
371
- <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:session_id</span><span class='comma'>,</span> <span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:location</span><span class='comma'>,</span> <span class='symbol'>:api_key</span><span class='comma'>,</span> <span class='symbol'>:api_secret</span>
378
+ <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:session_id</span><span class='comma'>,</span> <span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:location</span><span class='comma'>,</span> <span class='symbol'>:archive_mode</span><span class='comma'>,</span> <span class='symbol'>:api_key</span><span class='comma'>,</span> <span class='symbol'>:api_secret</span>
372
379
 
373
380
  <span class='comment'># @private
374
381
  </span> <span class='comment'># this implementation doesn't completely understand the format of a Session ID
@@ -384,7 +391,7 @@ cannot be updated once it is set.</p>
384
391
  <span class='comment'># @private
385
392
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
386
393
  <span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='ivar'>@api_secret</span><span class='comma'>,</span> <span class='ivar'>@session_id</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span>
387
- <span class='ivar'>@media_mode</span><span class='comma'>,</span> <span class='ivar'>@location</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:relayed</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:location</span><span class='rbracket'>]</span>
394
+ <span class='ivar'>@media_mode</span><span class='comma'>,</span> <span class='ivar'>@location</span><span class='comma'>,</span> <span class='ivar'>@archive_mode</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:relayed</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:location</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:archive_mode</span><span class='comma'>,</span> <span class='symbol'>:manual</span><span class='rparen'>)</span>
388
395
  <span class='kw'>end</span>
389
396
 
390
397
  <span class='comment'># @private
@@ -402,9 +409,9 @@ cannot be updated once it is set.</p>
402
409
  </div>
403
410
 
404
411
  <div id="footer">
405
- Generated on Fri Jun 20 12:49:10 2014 by
412
+ Generated on Mon May 25 15:52:46 2015 by
406
413
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
407
- 0.8.7.4 (ruby-1.9.3).
414
+ 0.8.7.6 (ruby-1.9.3).
408
415
  </div>
409
416
 
410
417
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: OpenTok::Archive
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -169,6 +169,60 @@ epoch.</p>
169
169
  <p>The duration of the archive, in milliseconds.</p>
170
170
  </div></span>
171
171
 
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#has_audio-instance_method" title="#has_audio (instance method)">- (true, false) <strong>has_audio</strong> </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'>
196
+ <p>Whether the archive has an audio track (true) or not (false).</p>
197
+ </div></span>
198
+
199
+ </li>
200
+
201
+
202
+ <li class="public ">
203
+ <span class="summary_signature">
204
+
205
+ <a href="#has_video-instance_method" title="#has_video (instance method)">- (true, false) <strong>has_video</strong> </a>
206
+
207
+
208
+
209
+ </span>
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'>
223
+ <p>Whether the archive has a video track (true) or not (false).</p>
224
+ </div></span>
225
+
172
226
  </li>
173
227
 
174
228
 
@@ -223,6 +277,34 @@ epoch.</p>
223
277
  <p>The name of the archive.</p>
224
278
  </div></span>
225
279
 
280
+ </li>
281
+
282
+
283
+ <li class="public ">
284
+ <span class="summary_signature">
285
+
286
+ <a href="#output_mode-instance_method" title="#output_mode (instance method)">- (String) <strong>output_mode</strong> </a>
287
+
288
+
289
+
290
+ </span>
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+ <span class="summary_desc"><div class='inline'>
304
+ <p>Whether all streams in the archive are recorded to a single file
305
+ (:composed) or to individual files (:individual).</p>
306
+ </div></span>
307
+
226
308
  </li>
227
309
 
228
310
 
@@ -499,24 +581,32 @@ exceeded", "failure", "session ended", or "user initiated".</p>
499
581
  <pre class="lines">
500
582
 
501
583
 
502
- 84
503
- 85
504
- 86
505
- 87
506
- 88
507
- 89
508
- 90
509
- 91
510
- 92</pre>
584
+ 100
585
+ 101
586
+ 102
587
+ 103
588
+ 104
589
+ 105
590
+ 106
591
+ 107
592
+ 108
593
+ 109
594
+ 110
595
+ 111
596
+ 112</pre>
511
597
  </td>
512
598
  <td>
513
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 84</span>
599
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 100</span>
514
600
 
515
601
  <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
516
602
  <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='symbol'>:lower</span><span class='rparen'>)</span>
517
603
  <span class='kw'>if</span> <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='kw'>and</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
518
604
  <span class='comment'># TODO: convert create_time method call to a Time object
519
- </span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span>
605
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outputMode</span><span class='tstring_end'>'</span></span>
606
+ <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
607
+ <span class='kw'>else</span>
608
+ <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span>
609
+ <span class='kw'>end</span>
520
610
  <span class='kw'>else</span>
521
611
  <span class='kw'>super</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
522
612
  <span class='kw'>end</span>
@@ -578,12 +668,12 @@ epoch.</p>
578
668
  <pre class="lines">
579
669
 
580
670
 
581
- 50
582
- 51
583
- 52</pre>
671
+ 66
672
+ 67
673
+ 68</pre>
584
674
  </td>
585
675
  <td>
586
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
676
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
587
677
 
588
678
  <span class='kw'>def</span> <span class='id identifier rubyid_created_at'>created_at</span>
589
679
  <span class='ivar'>@created_at</span>
@@ -639,12 +729,12 @@ epoch.</p>
639
729
  <pre class="lines">
640
730
 
641
731
 
642
- 50
643
- 51
644
- 52</pre>
732
+ 66
733
+ 67
734
+ 68</pre>
645
735
  </td>
646
736
  <td>
647
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
737
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
648
738
 
649
739
  <span class='kw'>def</span> <span class='id identifier rubyid_duration'>duration</span>
650
740
  <span class='ivar'>@duration</span>
@@ -655,6 +745,128 @@ epoch.</p>
655
745
  </div>
656
746
 
657
747
 
748
+ <span id="has_audio=-instance_method"></span>
749
+ <div class="method_details ">
750
+ <h3 class="signature " id="has_audio-instance_method">
751
+
752
+ - (<tt>true</tt>, <tt>false</tt>) <strong>has_audio</strong>
753
+
754
+
755
+
756
+
757
+
758
+ </h3><div class="docstring">
759
+ <div class="discussion">
760
+
761
+ <p>Whether the archive has an audio track (true) or not (false).</p>
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+ <p class="tag_title">Returns:</p>
769
+ <ul class="return">
770
+
771
+ <li>
772
+
773
+
774
+ <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
775
+
776
+
777
+
778
+ &mdash;
779
+ <div class='inline'>
780
+ <p>the current value of has_audio</p>
781
+ </div>
782
+
783
+ </li>
784
+
785
+ </ul>
786
+
787
+ </div><table class="source_code">
788
+ <tr>
789
+ <td>
790
+ <pre class="lines">
791
+
792
+
793
+ 66
794
+ 67
795
+ 68</pre>
796
+ </td>
797
+ <td>
798
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
799
+
800
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_audio'>has_audio</span>
801
+ <span class='ivar'>@has_audio</span>
802
+ <span class='kw'>end</span></pre>
803
+ </td>
804
+ </tr>
805
+ </table>
806
+ </div>
807
+
808
+
809
+ <span id="has_video=-instance_method"></span>
810
+ <div class="method_details ">
811
+ <h3 class="signature " id="has_video-instance_method">
812
+
813
+ - (<tt>true</tt>, <tt>false</tt>) <strong>has_video</strong>
814
+
815
+
816
+
817
+
818
+
819
+ </h3><div class="docstring">
820
+ <div class="discussion">
821
+
822
+ <p>Whether the archive has a video track (true) or not (false).</p>
823
+
824
+
825
+ </div>
826
+ </div>
827
+ <div class="tags">
828
+
829
+ <p class="tag_title">Returns:</p>
830
+ <ul class="return">
831
+
832
+ <li>
833
+
834
+
835
+ <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
836
+
837
+
838
+
839
+ &mdash;
840
+ <div class='inline'>
841
+ <p>the current value of has_video</p>
842
+ </div>
843
+
844
+ </li>
845
+
846
+ </ul>
847
+
848
+ </div><table class="source_code">
849
+ <tr>
850
+ <td>
851
+ <pre class="lines">
852
+
853
+
854
+ 66
855
+ 67
856
+ 68</pre>
857
+ </td>
858
+ <td>
859
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
860
+
861
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_video'>has_video</span>
862
+ <span class='ivar'>@has_video</span>
863
+ <span class='kw'>end</span></pre>
864
+ </td>
865
+ </tr>
866
+ </table>
867
+ </div>
868
+
869
+
658
870
  <span id="id=-instance_method"></span>
659
871
  <div class="method_details ">
660
872
  <h3 class="signature " id="id-instance_method">
@@ -700,12 +912,12 @@ epoch.</p>
700
912
  <pre class="lines">
701
913
 
702
914
 
703
- 50
704
- 51
705
- 52</pre>
915
+ 66
916
+ 67
917
+ 68</pre>
706
918
  </td>
707
919
  <td>
708
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
920
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
709
921
 
710
922
  <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
711
923
  <span class='ivar'>@id</span>
@@ -762,12 +974,12 @@ created, this is set to null.</p>
762
974
  <pre class="lines">
763
975
 
764
976
 
765
- 50
766
- 51
767
- 52</pre>
977
+ 66
978
+ 67
979
+ 68</pre>
768
980
  </td>
769
981
  <td>
770
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
982
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
771
983
 
772
984
  <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
773
985
  <span class='ivar'>@name</span>
@@ -778,6 +990,68 @@ created, this is set to null.</p>
778
990
  </div>
779
991
 
780
992
 
993
+ <span id="output_mode=-instance_method"></span>
994
+ <div class="method_details ">
995
+ <h3 class="signature " id="output_mode-instance_method">
996
+
997
+ - (<tt>String</tt>) <strong>output_mode</strong>
998
+
999
+
1000
+
1001
+
1002
+
1003
+ </h3><div class="docstring">
1004
+ <div class="discussion">
1005
+
1006
+ <p>Whether all streams in the archive are recorded to a single file
1007
+ (<tt>:composed</tt>) or to individual files (<tt>:individual</tt>).</p>
1008
+
1009
+
1010
+ </div>
1011
+ </div>
1012
+ <div class="tags">
1013
+
1014
+ <p class="tag_title">Returns:</p>
1015
+ <ul class="return">
1016
+
1017
+ <li>
1018
+
1019
+
1020
+ <span class='type'>(<tt>String</tt>)</span>
1021
+
1022
+
1023
+
1024
+ &mdash;
1025
+ <div class='inline'>
1026
+ <p>the current value of output_mode</p>
1027
+ </div>
1028
+
1029
+ </li>
1030
+
1031
+ </ul>
1032
+
1033
+ </div><table class="source_code">
1034
+ <tr>
1035
+ <td>
1036
+ <pre class="lines">
1037
+
1038
+
1039
+ 66
1040
+ 67
1041
+ 68</pre>
1042
+ </td>
1043
+ <td>
1044
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
1045
+
1046
+ <span class='kw'>def</span> <span class='id identifier rubyid_output_mode'>output_mode</span>
1047
+ <span class='ivar'>@output_mode</span>
1048
+ <span class='kw'>end</span></pre>
1049
+ </td>
1050
+ </tr>
1051
+ </table>
1052
+ </div>
1053
+
1054
+
781
1055
  <span id="partner_id=-instance_method"></span>
782
1056
  <div class="method_details ">
783
1057
  <h3 class="signature " id="partner_id-instance_method">
@@ -823,12 +1097,12 @@ created, this is set to null.</p>
823
1097
  <pre class="lines">
824
1098
 
825
1099
 
826
- 50
827
- 51
828
- 52</pre>
1100
+ 66
1101
+ 67
1102
+ 68</pre>
829
1103
  </td>
830
1104
  <td>
831
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1105
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
832
1106
 
833
1107
  <span class='kw'>def</span> <span class='id identifier rubyid_partner_id'>partner_id</span>
834
1108
  <span class='ivar'>@partner_id</span>
@@ -886,12 +1160,12 @@ with the status "failed", this can be set to "system failure".</p>
886
1160
  <pre class="lines">
887
1161
 
888
1162
 
889
- 50
890
- 51
891
- 52</pre>
1163
+ 66
1164
+ 67
1165
+ 68</pre>
892
1166
  </td>
893
1167
  <td>
894
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1168
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
895
1169
 
896
1170
  <span class='kw'>def</span> <span class='id identifier rubyid_reason'>reason</span>
897
1171
  <span class='ivar'>@reason</span>
@@ -947,12 +1221,12 @@ with the status "failed", this can be set to "system failure".</p>
947
1221
  <pre class="lines">
948
1222
 
949
1223
 
950
- 50
951
- 51
952
- 52</pre>
1224
+ 66
1225
+ 67
1226
+ 68</pre>
953
1227
  </td>
954
1228
  <td>
955
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1229
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
956
1230
 
957
1231
  <span class='kw'>def</span> <span class='id identifier rubyid_session_id'>session_id</span>
958
1232
  <span class='ivar'>@session_id</span>
@@ -1009,12 +1283,12 @@ value is set to 0.</p>
1009
1283
  <pre class="lines">
1010
1284
 
1011
1285
 
1012
- 50
1013
- 51
1014
- 52</pre>
1286
+ 66
1287
+ 67
1288
+ 68</pre>
1015
1289
  </td>
1016
1290
  <td>
1017
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1291
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
1018
1292
 
1019
1293
  <span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span>
1020
1294
  <span class='ivar'>@size</span>
@@ -1048,6 +1322,14 @@ OpenTok cloud.</p>
1048
1322
  </li><li>
1049
1323
  <p>"failed" -- The archive recording failed.</p>
1050
1324
  </li><li>
1325
+ <p>"paused" -- The archive is in progress and no clients are publishing
1326
+ streams to the session. When an archive is in progress and any client
1327
+ publishes a stream, the status is "started". When an archive is paused,
1328
+ nothing is recorded. When a client starts publishing a stream, the
1329
+ recording starts (or resumes). If all clients disconnect from a session
1330
+ that is being archived, the status changes to "paused", and after 60
1331
+ seconds the archive recording stops (and the status changes to "stopped").</p>
1332
+ </li><li>
1051
1333
  <p>"started" -- The archive started and is in the process of being recorded.</p>
1052
1334
  </li><li>
1053
1335
  <p>"stopped" -- The archive stopped recording.</p>
@@ -1088,12 +1370,12 @@ href="https://dashboard.tokbox.com">dashboard.tokbox.com</a>).</p>
1088
1370
  <pre class="lines">
1089
1371
 
1090
1372
 
1091
- 50
1092
- 51
1093
- 52</pre>
1373
+ 66
1374
+ 67
1375
+ 68</pre>
1094
1376
  </td>
1095
1377
  <td>
1096
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1378
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
1097
1379
 
1098
1380
  <span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
1099
1381
  <span class='ivar'>@status</span>
@@ -1154,12 +1436,12 @@ OpenTok.getArchive() method.</p>
1154
1436
  <pre class="lines">
1155
1437
 
1156
1438
 
1157
- 50
1158
- 51
1159
- 52</pre>
1439
+ 66
1440
+ 67
1441
+ 68</pre>
1160
1442
  </td>
1161
1443
  <td>
1162
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 50</span>
1444
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
1163
1445
 
1164
1446
  <span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
1165
1447
  <span class='ivar'>@url</span>
@@ -1207,13 +1489,13 @@ making it unavailable for download.</p>
1207
1489
  <pre class="lines">
1208
1490
 
1209
1491
 
1210
- 78
1211
- 79
1212
- 80
1213
- 81</pre>
1492
+ 94
1493
+ 95
1494
+ 96
1495
+ 97</pre>
1214
1496
  </td>
1215
1497
  <td>
1216
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 78</span>
1498
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 94</span>
1217
1499
 
1218
1500
  <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
1219
1501
  <span class='comment'># TODO: validate returned json fits schema
@@ -1253,13 +1535,13 @@ have disconnected from the session being archived.</p>
1253
1535
  <pre class="lines">
1254
1536
 
1255
1537
 
1256
- 68
1257
- 69
1258
- 70
1259
- 71</pre>
1538
+ 84
1539
+ 85
1540
+ 86
1541
+ 87</pre>
1260
1542
  </td>
1261
1543
  <td>
1262
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 68</span>
1544
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 84</span>
1263
1545
 
1264
1546
  <span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
1265
1547
  <span class='comment'># TODO: validate returned json fits schema
@@ -1296,12 +1578,12 @@ have disconnected from the session being archived.</p>
1296
1578
  <pre class="lines">
1297
1579
 
1298
1580
 
1299
- 60
1300
- 61
1301
- 62</pre>
1581
+ 76
1582
+ 77
1583
+ 78</pre>
1302
1584
  </td>
1303
1585
  <td>
1304
- <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 60</span>
1586
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 76</span>
1305
1587
 
1306
1588
  <span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span>
1307
1589
  <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
@@ -1316,9 +1598,9 @@ have disconnected from the session being archived.</p>
1316
1598
  </div>
1317
1599
 
1318
1600
  <div id="footer">
1319
- Generated on Fri Jun 20 12:49:10 2014 by
1601
+ Generated on Mon May 25 15:52:46 2015 by
1320
1602
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1321
- 0.8.7.4 (ruby-1.9.3).
1603
+ 0.8.7.6 (ruby-1.9.3).
1322
1604
  </div>
1323
1605
 
1324
1606
  </body>