opentok 3.0.3 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/metrics.yml +17 -0
  3. data/.travis.yml +3 -1
  4. data/CODE_OF_CONDUCT.md +128 -0
  5. data/README.md +312 -28
  6. data/lib/opentok/archive.rb +45 -4
  7. data/lib/opentok/archives.rb +73 -5
  8. data/lib/opentok/broadcast.rb +118 -0
  9. data/lib/opentok/broadcasts.rb +149 -0
  10. data/lib/opentok/client.rb +212 -7
  11. data/lib/opentok/connections.rb +28 -0
  12. data/lib/opentok/constants.rb +1 -1
  13. data/lib/opentok/exceptions.rb +6 -0
  14. data/lib/opentok/opentok.rb +44 -10
  15. data/lib/opentok/session.rb +5 -0
  16. data/lib/opentok/signals.rb +47 -0
  17. data/lib/opentok/sip.rb +33 -0
  18. data/lib/opentok/stream.rb +46 -0
  19. data/lib/opentok/stream_list.rb +18 -0
  20. data/lib/opentok/streams.rb +79 -0
  21. data/lib/opentok/version.rb +1 -1
  22. data/opentok.gemspec +9 -8
  23. data/sample/Broadcast/Gemfile +4 -0
  24. data/sample/Broadcast/README.md +201 -0
  25. data/sample/Broadcast/broadcast_sample.rb +97 -0
  26. data/sample/Broadcast/public/css/sample.css +64 -0
  27. data/sample/Broadcast/public/js/host.js +185 -0
  28. data/sample/Broadcast/public/js/participant.js +85 -0
  29. data/sample/Broadcast/views/host.erb +82 -0
  30. data/sample/Broadcast/views/index.erb +32 -0
  31. data/sample/Broadcast/views/layout.erb +29 -0
  32. data/sample/Broadcast/views/participant.erb +27 -0
  33. data/sample/HelloWorld/public/js/helloworld.js +4 -10
  34. data/sample/HelloWorld/views/index.erb +1 -3
  35. data/spec/cassettes/OpenTok_Archives/calls_layout_on_archive_object.yml +47 -0
  36. data/spec/cassettes/OpenTok_Archives/changes_the_layout_of_an_archive.yml +38 -0
  37. data/spec/cassettes/OpenTok_Archives/http_client_errors/.yml +34 -0
  38. data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +3 -1
  39. data/spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml +3 -1
  40. data/spec/cassettes/OpenTok_Archives/should_create_custom_layout_archives.yml +50 -0
  41. data/spec/cassettes/OpenTok_Archives/should_create_hd_archives.yml +54 -0
  42. data/spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml +3 -1
  43. data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +3 -1
  44. data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +3 -1
  45. data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +3 -1
  46. data/spec/cassettes/OpenTok_Archives/should_find_archives_with_unknown_properties.yml +3 -1
  47. data/spec/cassettes/OpenTok_Archives/should_find_expired_archives.yml +3 -1
  48. data/spec/cassettes/OpenTok_Archives/should_find_paused_archives_by_id.yml +3 -1
  49. data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +3 -1
  50. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +3 -1
  51. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +3 -1
  52. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +3 -1
  53. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +3 -1
  54. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_session_archives.yml +3 -1
  55. data/spec/cassettes/OpenTok_Broadcasts/calls_layout_on_broadcast_object.yml +57 -0
  56. data/spec/cassettes/OpenTok_Broadcasts/changes_the_layout_of_a_broadcast.yml +38 -0
  57. data/spec/cassettes/OpenTok_Broadcasts/fetches_a_hls_broadcast_url.yml +52 -0
  58. data/spec/cassettes/OpenTok_Broadcasts/finds_a_broadcast.yml +57 -0
  59. data/spec/cassettes/OpenTok_Broadcasts/starts_a_rtmp_broadcast.yml +61 -0
  60. data/spec/cassettes/OpenTok_Broadcasts/stops_a_broadcast.yml +47 -0
  61. data/spec/cassettes/OpenTok_Connections/forces_a_connection_to_be_terminated.yml +38 -0
  62. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml +3 -1
  63. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +3 -1
  64. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +3 -1
  65. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_for_invalid_media_modes.yml +3 -1
  66. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +3 -1
  67. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +3 -1
  68. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +3 -1
  69. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +3 -1
  70. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/with_an_addendum_to_the_user_agent_string/should_append_the_addendum_to_the_user_agent_header.yml +3 -1
  71. data/spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_a_connection.yml +39 -0
  72. data/spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_all_connections.yml +39 -0
  73. data/spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml +3 -1
  74. data/spec/cassettes/OpenTok_Streams/get_all_streams_information.yml +55 -0
  75. data/spec/cassettes/OpenTok_Streams/get_specific_stream_information.yml +44 -0
  76. data/spec/cassettes/OpenTok_Streams/layout_working_on_two_stream_list.yml +38 -0
  77. data/spec/opentok/archives_spec.rb +84 -1
  78. data/spec/opentok/broadcasts_spec.rb +171 -0
  79. data/spec/opentok/client_spec.rb +51 -0
  80. data/spec/opentok/connection_spec.rb +38 -0
  81. data/spec/opentok/opentok_spec.rb +21 -0
  82. data/spec/opentok/signal_spec.rb +50 -0
  83. data/spec/opentok/streams_spec.rb +75 -0
  84. data/spec/spec_helper.rb +2 -0
  85. metadata +84 -22
@@ -0,0 +1,51 @@
1
+ require "opentok/opentok"
2
+ require "opentok/version"
3
+
4
+ require "spec_helper"
5
+ require "shared/opentok_generates_tokens"
6
+
7
+ describe OpenTok::Client do
8
+ before(:each) do
9
+ now = Time.parse("2017-04-18 20:17:40 +1000")
10
+ allow(Time).to receive(:now) { now }
11
+ end
12
+
13
+ let(:api_key) { "123456" }
14
+ let(:api_secret) { "1234567890abcdef1234567890abcdef1234567890" }
15
+ let(:api_url) { "https://api.opentok.com" }
16
+
17
+
18
+ let(:client) { OpenTok::Client.new api_key, api_secret, api_url }
19
+ subject { client }
20
+
21
+ context "when initialized with no options" do
22
+ it { should be_an_instance_of OpenTok::Client }
23
+
24
+ it "should have an api_key property" do
25
+ expect(client.api_key).to eq api_key
26
+ end
27
+
28
+ it "should have an api_secret property" do
29
+ expect(client.api_secret).to eq api_secret
30
+ end
31
+
32
+ it "should be able to access HTTParty open_timeout method" do
33
+ expect(OpenTok::Client).to respond_to(:open_timeout)
34
+ end
35
+
36
+ it 'should have a default timeout_length property of 2 seconds' do
37
+ expect(client.timeout_length).to eq 2
38
+ end
39
+ end
40
+
41
+ context "when initialized with timeout_length custom option" do
42
+ let(:client) { OpenTok::Client.new api_key, api_secret, api_url, ua_addendum='', :timeout_length => timeout_length }
43
+ let(:timeout_length) { 10 }
44
+
45
+ it { should be_an_instance_of(OpenTok::Client) }
46
+
47
+ it "should override timeout_length default with custom integer" do
48
+ expect(client.timeout_length).to eq 10
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,38 @@
1
+ require "opentok/opentok"
2
+ require "opentok/version"
3
+ require "opentok/connections"
4
+ require "spec_helper"
5
+
6
+ describe OpenTok::Connections do
7
+ before(:each) do
8
+ now = Time.parse("2017-04-18 20:17:40 +1000")
9
+ allow(Time).to receive(:now) { now }
10
+ end
11
+
12
+ let(:api_key) { "123456" }
13
+ let(:api_secret) { "1234567890abcdef1234567890abcdef1234567890" }
14
+ let(:session_id) { "SESSIONID" }
15
+ let(:connection_id) { "CONNID" }
16
+ let(:opentok) { OpenTok::OpenTok.new api_key, api_secret }
17
+ let(:connection) { opentok.connections }
18
+
19
+ subject { connection }
20
+
21
+
22
+ it 'raise an error on nil session_id' do
23
+ expect {
24
+ connection.forceDisconnect(nil,connection_id)
25
+ }.to raise_error(ArgumentError)
26
+ end
27
+
28
+ it 'raise an error on nil connection_id' do
29
+ expect {
30
+ connection.forceDisconnect(session_id,nil)
31
+ }.to raise_error(ArgumentError)
32
+ end
33
+
34
+ it "forces a connection to be terminated", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
35
+ response = connection.forceDisconnect(session_id, connection_id)
36
+ expect(response).not_to be_nil
37
+ end
38
+ end
@@ -31,6 +31,10 @@ describe OpenTok::OpenTok do
31
31
  expect(opentok.api_url).to eq default_api_url
32
32
  end
33
33
 
34
+ it "has the default timeout set" do
35
+ expect(opentok.timeout_length).to eq 2
36
+ end
37
+
34
38
  include_examples "opentok generates tokens"
35
39
 
36
40
  describe "#create_session" do
@@ -139,6 +143,23 @@ describe OpenTok::OpenTok do
139
143
  # include_examples "generates tokens"
140
144
  end
141
145
 
146
+ context "with a custom timeout_length" do
147
+ let(:timeout_length) { 10 }
148
+ let(:opentok) { OpenTok::OpenTok.new api_key, api_secret, :timeout_length => timeout_length }
149
+
150
+ it { should be_an_instance_of(OpenTok::OpenTok) }
151
+
152
+ it "should have an timeout_length property" do
153
+ expect(opentok.timeout_length).to eq timeout_length
154
+ end
155
+
156
+ it "should send the custom timeout_length to new instances of OpenTok::Client" do
157
+ streams = opentok.streams
158
+
159
+ expect(streams.instance_variable_get(:@client).timeout_length).to eq timeout_length
160
+ end
161
+ end
162
+
142
163
  context "with an addendum to the user agent string" do
143
164
  let(:opentok) { OpenTok::OpenTok.new api_key, api_secret, :ua_addendum => ua_addendum }
144
165
  let(:ua_addendum) { "BOOYAH"}
@@ -0,0 +1,50 @@
1
+ require "opentok/signals"
2
+ require "opentok/opentok"
3
+ require "opentok/version"
4
+ require "spec_helper"
5
+
6
+ describe OpenTok::Signals do
7
+ before(:each) do
8
+ now = Time.parse("2017-04-18 20:17:40 +1000")
9
+ allow(Time).to receive(:now) { now }
10
+ end
11
+
12
+ let(:api_key) { "123456" }
13
+ let(:api_secret) { "1234567890abcdef1234567890abcdef1234567890" }
14
+ let(:session_id) { "SESSIONID" }
15
+ let(:connection_id) { "CONNID" }
16
+ let(:opentok) { OpenTok::OpenTok.new api_key, api_secret }
17
+ let(:signal) { opentok.signals }
18
+
19
+ subject { signal }
20
+
21
+ it 'raise an error on nil sessionId' do
22
+ expect {
23
+ signal.send(nil)
24
+ }.to raise_error(ArgumentError)
25
+ end
26
+
27
+ it 'raise an error on empty sessionId' do
28
+ expect {
29
+ signal.send('')
30
+ }.to raise_error(ArgumentError)
31
+ end
32
+
33
+ it "receives a valid response for all connections", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
34
+ opts = { "type" => "chat",
35
+ "data" => "Hello",
36
+ }
37
+ response = signal.send(session_id, "", opts)
38
+ expect(response).not_to be_nil
39
+ end
40
+
41
+ it "receives a valid response for a connection", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
42
+ opts = { "type" => "chat",
43
+ "data" => "Hello",
44
+ }
45
+ response = signal.send(session_id, connection_id, opts)
46
+ expect(response).not_to be_nil
47
+ end
48
+
49
+
50
+ end
@@ -0,0 +1,75 @@
1
+ require 'opentok/opentok'
2
+ require 'opentok/version'
3
+ require 'opentok/streams'
4
+ require 'opentok/stream'
5
+ require 'opentok/stream_list'
6
+
7
+ require 'spec_helper'
8
+
9
+ describe OpenTok::Streams do
10
+ before(:each) do
11
+ now = Time.parse('2017-04-18 20:17:40 +1000')
12
+ allow(Time).to receive(:now) { now }
13
+ end
14
+
15
+ let(:api_key) { '123456' }
16
+ let(:api_secret) { '1234567890abcdef1234567890abcdef1234567890' }
17
+ let(:session_id) { 'SESSIONID' }
18
+ let(:stream_id) { 'STREAMID' }
19
+ let(:opentok) { OpenTok::OpenTok.new api_key, api_secret }
20
+ let(:streams) { opentok.streams}
21
+
22
+ subject { streams }
23
+
24
+ it { should be_an_instance_of OpenTok::Streams }
25
+ it 'raise an error on nil session_id' do
26
+ expect {
27
+ streams.all(nil)
28
+ }.to raise_error(ArgumentError)
29
+ end
30
+ it 'raise an error on empty session_id' do
31
+ expect {
32
+ streams.all('')
33
+ }.to raise_error(ArgumentError)
34
+ end
35
+ it 'get all streams information', :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
36
+ all_streams = streams.all(session_id)
37
+ expect(all_streams).to be_an_instance_of OpenTok::StreamList
38
+ expect(all_streams.total).to eq 2
39
+ expect(all_streams[0].layoutClassList[1]).to eq "focus"
40
+ end
41
+ it 'get specific stream information', :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
42
+ stream = streams.find(session_id, stream_id)
43
+ expect(stream).to be_an_instance_of OpenTok::Stream
44
+ expect(stream.videoType).to eq 'camera'
45
+ expect(stream.layoutClassList.count).to eq 1
46
+ expect(stream.layoutClassList.first).to eq "full"
47
+ expect(stream.id).not_to be_nil
48
+ end
49
+ it 'layout raises an error on empty session_id' do
50
+ expect {
51
+ streams.layout('', {} )
52
+ }.to raise_error(ArgumentError)
53
+ end
54
+ it 'layout raises an error on an empty stream list' do
55
+ expect {
56
+ streams.layout(session_id, {})
57
+ }.to raise_error(ArgumentError)
58
+ end
59
+ it 'layout working on two stream list', :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
60
+ streams_list = {
61
+ :items => [
62
+ {
63
+ :id => "8b732909-0a06-46a2-8ea8-074e64d43422",
64
+ :layoutClassList => ["full"]
65
+ },
66
+ {
67
+ :id => "8b732909-0a06-46a2-8ea8-074e64d43423",
68
+ :layoutClassList => ["full", "focus"]
69
+ }
70
+ ]
71
+ }
72
+ response = streams.layout(session_id, streams_list)
73
+ expect(response).not_to be_nil
74
+ end
75
+ end
@@ -13,3 +13,5 @@ RSpec.configure do |c|
13
13
  # in RSpec 3 this will no longer be necessary.
14
14
  c.treat_symbols_as_metadata_keys_with_true_values = true
15
15
  end
16
+
17
+ RSpec::Expectations.configuration.on_potential_false_positives = :nothing
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: 3.0.3
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stijn Mathysen
@@ -12,20 +12,20 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-07-10 00:00:00.000000000 Z
15
+ date: 2020-06-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - "~>"
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: '1.5'
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: '1.5'
31
31
  - !ruby/object:Gem::Dependency
@@ -34,68 +34,68 @@ dependencies:
34
34
  requirements:
35
35
  - - "~>"
36
36
  - !ruby/object:Gem::Version
37
- version: 10.1.1
37
+ version: 12.0.0
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
- version: 10.1.1
44
+ version: 12.0.0
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: rspec
47
47
  requirement: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - "~>"
50
50
  - !ruby/object:Gem::Version
51
- version: 2.14.1
51
+ version: 3.9.0
52
52
  type: :development
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: 2.14.1
58
+ version: 3.9.0
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: webmock
61
61
  requirement: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - "~>"
63
+ - - ">="
64
64
  - !ruby/object:Gem::Version
65
65
  version: 2.3.2
66
66
  type: :development
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - "~>"
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 2.3.2
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: vcr
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: 2.8.0
80
80
  type: :development
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - "~>"
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.8.0
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: yard
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - "~>"
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: 0.9.11
94
94
  type: :development
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - "~>"
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: 0.9.11
101
101
  - !ruby/object:Gem::Dependency
@@ -116,16 +116,16 @@ dependencies:
116
116
  name: httparty
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - "~>"
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: 0.15.5
121
+ version: 0.18.0
122
122
  type: :runtime
123
123
  prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
- - - "~>"
126
+ - - ">="
127
127
  - !ruby/object:Gem::Version
128
- version: 0.15.5
128
+ version: 0.18.0
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: activesupport
131
131
  requirement: !ruby/object:Gem::Requirement
@@ -144,14 +144,14 @@ dependencies:
144
144
  name: jwt
145
145
  requirement: !ruby/object:Gem::Requirement
146
146
  requirements:
147
- - - "~>"
147
+ - - ">="
148
148
  - !ruby/object:Gem::Version
149
149
  version: 1.5.6
150
150
  type: :runtime
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - "~>"
154
+ - - ">="
155
155
  - !ruby/object:Gem::Version
156
156
  version: 1.5.6
157
157
  description: OpenTok is an API from TokBox that enables websites to weave live group
@@ -170,9 +170,11 @@ executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files: []
172
172
  files:
173
+ - ".github/workflows/metrics.yml"
173
174
  - ".gitignore"
174
175
  - ".travis.yml"
175
176
  - ".yardopts"
177
+ - CODE_OF_CONDUCT.md
176
178
  - CONTRIBUTING.md
177
179
  - DEVELOPING.md
178
180
  - Gemfile
@@ -183,13 +185,20 @@ files:
183
185
  - lib/opentok/archive.rb
184
186
  - lib/opentok/archive_list.rb
185
187
  - lib/opentok/archives.rb
188
+ - lib/opentok/broadcast.rb
189
+ - lib/opentok/broadcasts.rb
186
190
  - lib/opentok/client.rb
191
+ - lib/opentok/connections.rb
187
192
  - lib/opentok/constants.rb
188
193
  - lib/opentok/exceptions.rb
189
194
  - lib/opentok/extensions/hash.rb
190
195
  - lib/opentok/opentok.rb
191
196
  - lib/opentok/session.rb
197
+ - lib/opentok/signals.rb
192
198
  - lib/opentok/sip.rb
199
+ - lib/opentok/stream.rb
200
+ - lib/opentok/stream_list.rb
201
+ - lib/opentok/streams.rb
193
202
  - lib/opentok/token_generator.rb
194
203
  - lib/opentok/version.rb
195
204
  - opentok.gemspec
@@ -207,13 +216,28 @@ files:
207
216
  - sample/Archiving/views/index.erb
208
217
  - sample/Archiving/views/layout.erb
209
218
  - sample/Archiving/views/participant.erb
219
+ - sample/Broadcast/Gemfile
220
+ - sample/Broadcast/README.md
221
+ - sample/Broadcast/broadcast_sample.rb
222
+ - sample/Broadcast/public/css/sample.css
223
+ - sample/Broadcast/public/js/host.js
224
+ - sample/Broadcast/public/js/participant.js
225
+ - sample/Broadcast/views/host.erb
226
+ - sample/Broadcast/views/index.erb
227
+ - sample/Broadcast/views/layout.erb
228
+ - sample/Broadcast/views/participant.erb
210
229
  - sample/HelloWorld/Gemfile
211
230
  - sample/HelloWorld/README.md
212
231
  - sample/HelloWorld/hello_world.rb
213
232
  - sample/HelloWorld/public/js/helloworld.js
214
233
  - sample/HelloWorld/views/index.erb
234
+ - spec/cassettes/OpenTok_Archives/calls_layout_on_archive_object.yml
235
+ - spec/cassettes/OpenTok_Archives/changes_the_layout_of_an_archive.yml
236
+ - spec/cassettes/OpenTok_Archives/http_client_errors/.yml
215
237
  - spec/cassettes/OpenTok_Archives/should_create_archives.yml
216
238
  - spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml
239
+ - spec/cassettes/OpenTok_Archives/should_create_custom_layout_archives.yml
240
+ - spec/cassettes/OpenTok_Archives/should_create_hd_archives.yml
217
241
  - spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml
218
242
  - spec/cassettes/OpenTok_Archives/should_create_named_archives.yml
219
243
  - spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml
@@ -227,6 +251,13 @@ files:
227
251
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml
228
252
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml
229
253
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_session_archives.yml
254
+ - spec/cassettes/OpenTok_Broadcasts/calls_layout_on_broadcast_object.yml
255
+ - spec/cassettes/OpenTok_Broadcasts/changes_the_layout_of_a_broadcast.yml
256
+ - spec/cassettes/OpenTok_Broadcasts/fetches_a_hls_broadcast_url.yml
257
+ - spec/cassettes/OpenTok_Broadcasts/finds_a_broadcast.yml
258
+ - spec/cassettes/OpenTok_Broadcasts/starts_a_rtmp_broadcast.yml
259
+ - spec/cassettes/OpenTok_Broadcasts/stops_a_broadcast.yml
260
+ - spec/cassettes/OpenTok_Connections/forces_a_connection_to_be_terminated.yml
230
261
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml
231
262
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml
232
263
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml
@@ -236,12 +267,22 @@ files:
236
267
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml
237
268
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml
238
269
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/with_an_addendum_to_the_user_agent_string/should_append_the_addendum_to_the_user_agent_header.yml
270
+ - spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_a_connection.yml
271
+ - spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_all_connections.yml
239
272
  - spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml
273
+ - spec/cassettes/OpenTok_Streams/get_all_streams_information.yml
274
+ - spec/cassettes/OpenTok_Streams/get_specific_stream_information.yml
275
+ - spec/cassettes/OpenTok_Streams/layout_working_on_two_stream_list.yml
240
276
  - spec/matchers/token.rb
241
277
  - spec/opentok/archives_spec.rb
278
+ - spec/opentok/broadcasts_spec.rb
279
+ - spec/opentok/client_spec.rb
280
+ - spec/opentok/connection_spec.rb
242
281
  - spec/opentok/opentok_spec.rb
243
282
  - spec/opentok/session_spec.rb
283
+ - spec/opentok/signal_spec.rb
244
284
  - spec/opentok/sip_spec.rb
285
+ - spec/opentok/streams_spec.rb
245
286
  - spec/shared/opentok_generates_tokens.rb
246
287
  - spec/shared/session_generates_tokens.rb
247
288
  - spec/spec_helper.rb
@@ -264,14 +305,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
305
  - !ruby/object:Gem::Version
265
306
  version: '0'
266
307
  requirements: []
267
- rubyforge_project:
268
- rubygems_version: 2.5.2
308
+ rubygems_version: 3.0.0
269
309
  signing_key:
270
310
  specification_version: 4
271
311
  summary: Ruby gem for the OpenTok API
272
312
  test_files:
313
+ - spec/cassettes/OpenTok_Archives/calls_layout_on_archive_object.yml
314
+ - spec/cassettes/OpenTok_Archives/changes_the_layout_of_an_archive.yml
315
+ - spec/cassettes/OpenTok_Archives/http_client_errors/.yml
273
316
  - spec/cassettes/OpenTok_Archives/should_create_archives.yml
274
317
  - spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml
318
+ - spec/cassettes/OpenTok_Archives/should_create_custom_layout_archives.yml
319
+ - spec/cassettes/OpenTok_Archives/should_create_hd_archives.yml
275
320
  - spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml
276
321
  - spec/cassettes/OpenTok_Archives/should_create_named_archives.yml
277
322
  - spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml
@@ -285,6 +330,13 @@ test_files:
285
330
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml
286
331
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml
287
332
  - spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_session_archives.yml
333
+ - spec/cassettes/OpenTok_Broadcasts/calls_layout_on_broadcast_object.yml
334
+ - spec/cassettes/OpenTok_Broadcasts/changes_the_layout_of_a_broadcast.yml
335
+ - spec/cassettes/OpenTok_Broadcasts/fetches_a_hls_broadcast_url.yml
336
+ - spec/cassettes/OpenTok_Broadcasts/finds_a_broadcast.yml
337
+ - spec/cassettes/OpenTok_Broadcasts/starts_a_rtmp_broadcast.yml
338
+ - spec/cassettes/OpenTok_Broadcasts/stops_a_broadcast.yml
339
+ - spec/cassettes/OpenTok_Connections/forces_a_connection_to_be_terminated.yml
288
340
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml
289
341
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml
290
342
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml
@@ -294,12 +346,22 @@ test_files:
294
346
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml
295
347
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml
296
348
  - spec/cassettes/OpenTok_OpenTok/when_initialized_properly/with_an_addendum_to_the_user_agent_string/should_append_the_addendum_to_the_user_agent_header.yml
349
+ - spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_a_connection.yml
350
+ - spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_all_connections.yml
297
351
  - spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml
352
+ - spec/cassettes/OpenTok_Streams/get_all_streams_information.yml
353
+ - spec/cassettes/OpenTok_Streams/get_specific_stream_information.yml
354
+ - spec/cassettes/OpenTok_Streams/layout_working_on_two_stream_list.yml
298
355
  - spec/matchers/token.rb
299
356
  - spec/opentok/archives_spec.rb
357
+ - spec/opentok/broadcasts_spec.rb
358
+ - spec/opentok/client_spec.rb
359
+ - spec/opentok/connection_spec.rb
300
360
  - spec/opentok/opentok_spec.rb
301
361
  - spec/opentok/session_spec.rb
362
+ - spec/opentok/signal_spec.rb
302
363
  - spec/opentok/sip_spec.rb
364
+ - spec/opentok/streams_spec.rb
303
365
  - spec/shared/opentok_generates_tokens.rb
304
366
  - spec/shared/session_generates_tokens.rb
305
367
  - spec/spec_helper.rb