opentok 4.8.0 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc3a44c807492ac56f39fe6abed609c15c1627c3e2651f5d9a01cb8745dafa07
4
- data.tar.gz: 6970f77ecb445dae4096bfbd440a9beebf3047b5a7fa0de6ff7343a726fb4c1f
3
+ metadata.gz: c5299537135033f2ae95169f0a47017542fc51ac3bcf24e469219d3f00db5cda
4
+ data.tar.gz: 655c9293034b05b48f39f5f15809d0550f4774c5a097fb49bcf2aa46611e2c44
5
5
  SHA512:
6
- metadata.gz: 47fd19211b5616ce0d0862c69096a42c5de69285f2ee02be6873bcb84ace57a8c4631479bdef1420675c23283e834c353bcefc1a712984d1e639287c11b83e41
7
- data.tar.gz: 93ce88395b8133e9d3d2cbb0e32740cd520827450987e278ba901234d18f49fdfb3197506f72fbadd981b303fb0c215b16b2c25ceaf361f3c3b2933d78dee360
6
+ metadata.gz: 8b83473744134b0754c092d2a98e6d28af5a80c6ee373c48c8569af75cf84fc0106321c6a7b8e72ec253379bc4a4e431069a3c62fdcf45f7fba172ebf61e700f
7
+ data.tar.gz: b6946da6f229d0030fde0a09a9e969c7906f7da54151ed1f749b6af9bcd0ea0e1787521a73a98c23cebbaa60df4b8e79bddd39acd2d8367b721909488f65bc26
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.8.1
2
+
3
+ * Fixes a bug with the `Archives#create` method. See [#269](https://github.com/opentok/OpenTok-Ruby-SDK/pull/269) and [#270](https://github.com/opentok/OpenTok-Ruby-SDK/pull/270)
4
+
1
5
  # 4.8.0
2
6
 
3
7
  * Add support for Captions API [#267](https://github.com/opentok/OpenTok-Ruby-SDK/pull/267)
@@ -72,13 +72,14 @@ module OpenTok
72
72
  # set to null. The download URL is obfuscated, and the file is only available from the URL for
73
73
  # 10 minutes. To generate a new URL, call the Archive.listArchives() or OpenTok.getArchive() method.
74
74
  class Archive
75
- attr_reader :multi_archive_tag
75
+ attr_reader :multi_archive_tag, :stream_mode
76
76
  # @private
77
77
  def initialize(interface, json)
78
78
  @interface = interface
79
79
  # TODO: validate json fits schema
80
80
  @json = json
81
81
  @multi_archive_tag = @json['multiArchiveTag']
82
+ @stream_mode = @json['streamMode']
82
83
  end
83
84
 
84
85
  # A JSON-encoded string representation of the archive.
@@ -39,11 +39,11 @@ module OpenTok
39
39
  # (a video track is included). If you set both <code>has_audio</code> and
40
40
  # <code>has_video</code> to <code>false</code>, the call to the <code>create()</code>
41
41
  # method results in an error.
42
- # @option options [String] :multiArchiveTag (Optional) Set this to support recording multiple archives for the same session simultaneously.
42
+ # @option options [String] :multi_archive_tag (Optional) Set this to support recording multiple archives for the same session simultaneously.
43
43
  # Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive
44
44
  # that is {https://tokbox.com/developer/guides/archiving/#automatic automatically archived}. Note that the `multiArchiveTag` value is not included
45
45
  # in the response for the methods to {https://tokbox.com/developer/rest/#listing_archives list archives} and
46
- # {https://tokbox.com/developer/rest/#retrieve_archive_info retrieve archive information}. If you do not specify a unique `multiArchiveTag`,
46
+ # {https://tokbox.com/developer/rest/#retrieve_archive_info retrieve archive information}. If you do not specify a unique `multi_archive_tag`,
47
47
  # you can only record one archive at a time for a given session.
48
48
  # {https://tokbox.com/developer/guides/archiving/#simultaneous-archives See Simultaneous archives}.
49
49
  # @option options [String] :output_mode Whether all streams in the archive are recorded
@@ -56,7 +56,7 @@ module OpenTok
56
56
  # (HD portrait), or "1080x1920" (FHD portrait). This property only applies to composed archives. If you set
57
57
  # this property and set the outputMode property to "individual", a call to the method
58
58
  # results in an error.
59
- # @option options [String] :streamMode (Optional) Whether streams included in the archive are selected
59
+ # @option options [String] :stream_mode (Optional) Whether streams included in the archive are selected
60
60
  # automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"),
61
61
  # all streams in the session can be included in the archive. When streams are selected manually ("manual"),
62
62
  # you specify streams to be included based on calls to the {Archives#add_stream} method. You can specify whether a
@@ -97,7 +97,16 @@ module OpenTok
97
97
  "Resolution cannot be supplied for individual output mode" if options.key?(:resolution) and options[:output_mode] == :individual
98
98
 
99
99
  # normalize opts so all keys are symbols and only include valid_opts
100
- valid_opts = [ :name, :has_audio, :has_video, :output_mode, :resolution, :layout ]
100
+ valid_opts = [
101
+ :name,
102
+ :has_audio,
103
+ :has_video,
104
+ :output_mode,
105
+ :resolution,
106
+ :layout,
107
+ :multi_archive_tag,
108
+ :stream_mode
109
+ ]
101
110
  opts = options.inject({}) do |m,(k,v)|
102
111
  if valid_opts.include? k.to_sym
103
112
  m[k.to_sym] = v
@@ -1,4 +1,4 @@
1
1
  module OpenTok
2
2
  # @private
3
- VERSION = '4.8.0'
3
+ VERSION = '4.8.1'
4
4
  end
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.opentok.com/v2/project/123456/archive
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"sessionId":"SESSIONID"}'
8
+ string: '{"sessionId":"SESSIONID","multiArchiveTag":"archive-1"}'
9
9
  headers:
10
10
  User-Agent:
11
11
  - OpenTok-Ruby-SDK/<%= version %>
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/v2/project/123456/archive
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"sessionId":"SESSIONID","streamMode":"manual"}'
9
+ headers:
10
+ User-Agent:
11
+ - OpenTok-Ruby-SDK/<%= version %>
12
+ X-Opentok-Auth:
13
+ - eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Wed, 03 Jan 2024 14:32:20 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: UTF-8
37
+ string: |-
38
+ {
39
+ "createdAt" : 1395183243556,
40
+ "duration" : 0,
41
+ "id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
42
+ "name" : "",
43
+ "partnerId" : 123456,
44
+ "reason" : "",
45
+ "sessionId" : "SESSIONID",
46
+ "size" : 0,
47
+ "status" : "started",
48
+ "url" : null,
49
+ "streamMode":"manual"
50
+ }
51
+ recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
52
+ recorded_with: VCR 6.0.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.opentok.com/v2/project/123456/archive
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"sessionId":"SESSIONID"}'
8
+ string: '{"sessionId":"SESSIONID","multiArchiveTag":"archive-1"}'
9
9
  headers:
10
10
  User-Agent:
11
11
  - OpenTok-Ruby-SDK/<%= version %>
@@ -44,7 +44,7 @@ describe OpenTok::Archives do
44
44
 
45
45
  it "should create an archives with a specified multiArchiveTag", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
46
46
  archive_tag = 'archive-1'
47
- archive = archives.create session_id, :multiArchiveTag => archive_tag
47
+ archive = archives.create session_id, :multi_archive_tag => archive_tag
48
48
  expect(archive).to be_an_instance_of OpenTok::Archive
49
49
  expect(archive.session_id).to eq session_id
50
50
  expect(archive.multiArchiveTag).to eq archive_tag
@@ -52,7 +52,7 @@ describe OpenTok::Archives do
52
52
 
53
53
  it "should create an archive with matching multi_archive_tag when multiArchiveTag is specified", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
54
54
  archive_tag = 'archive-1'
55
- archive = archives.create session_id, :multiArchiveTag => archive_tag
55
+ archive = archives.create session_id, :multi_archive_tag => archive_tag
56
56
  expect(archive).to be_an_instance_of OpenTok::Archive
57
57
  expect(archive.multi_archive_tag).to eq archive_tag
58
58
  end
@@ -63,6 +63,13 @@ describe OpenTok::Archives do
63
63
  expect(archive.multi_archive_tag).to be_nil
64
64
  end
65
65
 
66
+ it "should create an archive with streamMode set to specified stream_mode value", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
67
+ stream_mode = 'manual'
68
+ archive = archives.create session_id, :stream_mode => stream_mode
69
+ expect(archive).to be_an_instance_of OpenTok::Archive
70
+ expect(archive.stream_mode).to eq stream_mode
71
+ end
72
+
66
73
  it "should create audio only archives", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" } } do
67
74
  archive = archives.create session_id, :has_video => false
68
75
  expect(archive).to be_an_instance_of OpenTok::Archive
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentok
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0
4
+ version: 4.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stijn Mathysen
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2023-09-06 00:00:00.000000000 Z
15
+ date: 2024-01-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -246,6 +246,7 @@ files:
246
246
  - spec/cassettes/OpenTok_Archives/removes_a_stream_from_an_archive.yml
247
247
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_matching_multi_archive_tag_when_multiArchiveTag_is_specified.yml
248
248
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_multi_archive_tag_value_of_nil_when_multiArchiveTag_not_specified.yml
249
+ - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_streamMode_set_to_specified_stream_mode_value.yml
249
250
  - spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml
250
251
  - spec/cassettes/OpenTok_Archives/should_create_archives.yml
251
252
  - spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml
@@ -354,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
354
355
  - !ruby/object:Gem::Version
355
356
  version: '0'
356
357
  requirements: []
357
- rubygems_version: 3.2.3
358
+ rubygems_version: 3.5.3
358
359
  signing_key:
359
360
  specification_version: 4
360
361
  summary: Ruby gem for the OpenTok API
@@ -366,6 +367,7 @@ test_files:
366
367
  - spec/cassettes/OpenTok_Archives/removes_a_stream_from_an_archive.yml
367
368
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_matching_multi_archive_tag_when_multiArchiveTag_is_specified.yml
368
369
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_multi_archive_tag_value_of_nil_when_multiArchiveTag_not_specified.yml
370
+ - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_streamMode_set_to_specified_stream_mode_value.yml
369
371
  - spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml
370
372
  - spec/cassettes/OpenTok_Archives/should_create_archives.yml
371
373
  - spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml