opentok 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08afb004026d5e2f7a095d057c455acf33bd8a0ea268b367fee4b27b63d15949'
4
- data.tar.gz: 1e0e778d936e767389554fcaa60a58663019b6016b23b4ca11520ad25404b631
3
+ metadata.gz: 454d2a2b89a14ec5af2ccb56e10c8a52d15eda5df4bf2f0f3274c4838499c8b4
4
+ data.tar.gz: d89e3eec35b639b3af4cc859291a4f1e464f197b5381333778112909ef1e11a7
5
5
  SHA512:
6
- metadata.gz: 8f99b13b1f41af4cffb9aaabeb93d6ef7f033ee739bbcdcaae6836742e53cab7d7c18a1e04ce3bab765be8ab03cf244f0bed719c034fc0e1d3caf811eb948eaa
7
- data.tar.gz: ad34ad438181cb082907a1d781f5a684ef5d83b88abec3a68cc1f3f7d31a1580f6b024f9c022a6cf58312fb33ad6bd1ab282df2d62a7ea2873cc844622f7a9c5
6
+ metadata.gz: 38f6b630ff8ad46fb07ebf47093adb418174afd4c2917bd9cf0ce1514090d4e3c9c0d9f9f4e9165ffe059e004e4eb724b4ad028e29c419d33006d326595c1da4
7
+ data.tar.gz: d66dce967d068ade1412c2b2fc23b80ba2a71eb528be1c8dab33dcf04813db2d0dbdb81b85a82b5c512dd0c5f4e777be61009422e51c4bf02e1d946adac00e1f
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.12.0
2
+
3
+ * Updating the `Archives#create` method to allow `max_bitrate` as an option. See [#288](https://github.com/opentok/OpenTok-Ruby-SDK/pull/288)
4
+
1
5
  # 4.11.0
2
6
 
3
7
  * Updating client token creation to use JWTs by default. See [#287](https://github.com/opentok/OpenTok-Ruby-SDK/pull/274)
@@ -79,6 +79,10 @@ module OpenTok
79
79
  # layout type. For more information, see
80
80
  # {https://tokbox.com/developer/guides/archiving/layout-control.html Customizing
81
81
  # the video layout for composed archives}.
82
+ # @option options [Integer] :max_bitrate (Optional) The maximum video bitrate for the archive, in bits per second. The minimum
83
+ # value is 100,000 and the maximum is 6,000,000. This option is only valid for composed archives. Set the maximum video bitrate
84
+ # to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has
85
+ # audio, those bits will be excluded from the limit.
82
86
  #
83
87
  # @return [Archive] The Archive object, which includes properties defining the archive,
84
88
  # including the archive ID.
@@ -105,7 +109,8 @@ module OpenTok
105
109
  :resolution,
106
110
  :layout,
107
111
  :multi_archive_tag,
108
- :stream_mode
112
+ :stream_mode,
113
+ :max_bitrate
109
114
  ]
110
115
  opts = options.inject({}) do |m,(k,v)|
111
116
  if valid_opts.include? k.to_sym
@@ -1,4 +1,4 @@
1
1
  module OpenTok
2
2
  # @private
3
- VERSION = '4.11.0'
3
+ VERSION = '4.12.0'
4
4
  end
@@ -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","maxBitrate":200000}'
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
+ - Fri, 07 Feb 2025 12:17: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
+ "maxBitrate": 200000
50
+ }
51
+ recorded_at: Fri, 07 Feb 2025 12:17:20 GMT
52
+ recorded_with: VCR 6.0.0
@@ -70,6 +70,13 @@ describe OpenTok::Archives do
70
70
  expect(archive.stream_mode).to eq stream_mode
71
71
  end
72
72
 
73
+ it "should create an archive with maxBitrate set to specified max_bitrate value", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
74
+ max_bitrate = 200000
75
+ archive = archives.create session_id, :max_bitrate => max_bitrate
76
+ expect(archive).to be_an_instance_of OpenTok::Archive
77
+ expect(archive.max_bitrate).to eq max_bitrate
78
+ end
79
+
73
80
  it "should create audio only archives", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" } } do
74
81
  archive = archives.create session_id, :has_video => false
75
82
  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.11.0
4
+ version: 4.12.0
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: 2025-02-06 00:00:00.000000000 Z
15
+ date: 2025-02-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -245,6 +245,7 @@ files:
245
245
  - spec/cassettes/OpenTok_Archives/http_client_errors/.yml
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
+ - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_maxBitrate_set_to_specified_max_bitrate_value.yml
248
249
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_multi_archive_tag_value_of_nil_when_multiArchiveTag_not_specified.yml
249
250
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_streamMode_set_to_specified_stream_mode_value.yml
250
251
  - spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml
@@ -366,6 +367,7 @@ test_files:
366
367
  - spec/cassettes/OpenTok_Archives/http_client_errors/.yml
367
368
  - spec/cassettes/OpenTok_Archives/removes_a_stream_from_an_archive.yml
368
369
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_matching_multi_archive_tag_when_multiArchiveTag_is_specified.yml
370
+ - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_maxBitrate_set_to_specified_max_bitrate_value.yml
369
371
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_multi_archive_tag_value_of_nil_when_multiArchiveTag_not_specified.yml
370
372
  - spec/cassettes/OpenTok_Archives/should_create_an_archive_with_streamMode_set_to_specified_stream_mode_value.yml
371
373
  - spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml