opentok 4.1.0 → 4.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +30 -0
- data/.github/workflows/metrics.yml +17 -0
- data/CHANGES.md +171 -0
- data/README.md +62 -38
- data/lib/opentok/archive.rb +54 -4
- data/lib/opentok/archives.rb +115 -11
- data/lib/opentok/broadcast.rb +50 -3
- data/lib/opentok/broadcast_list.rb +14 -0
- data/lib/opentok/broadcasts.rb +178 -19
- data/lib/opentok/client.rb +251 -0
- data/lib/opentok/connections.rb +1 -1
- data/lib/opentok/constants.rb +1 -0
- data/lib/opentok/exceptions.rb +3 -1
- data/lib/opentok/opentok.rb +16 -10
- data/lib/opentok/render.rb +78 -0
- data/lib/opentok/render_list.rb +14 -0
- data/lib/opentok/renders.rb +101 -0
- data/lib/opentok/session.rb +4 -4
- data/lib/opentok/sip.rb +40 -2
- data/lib/opentok/streams.rb +49 -2
- data/lib/opentok/token_generator.rb +1 -0
- data/lib/opentok/version.rb +1 -1
- data/opentok.gemspec +2 -1
- data/sample/Broadcast/README.md +42 -0
- data/sample/Broadcast/broadcast_sample.rb +15 -0
- data/sample/Broadcast/views/all.erb +46 -0
- data/sample/Broadcast/views/index.erb +16 -1
- data/spec/cassettes/OpenTok_Archives/adds_a_stream_to_an_archive.yml +37 -0
- data/spec/cassettes/OpenTok_Archives/removes_a_stream_from_an_archive.yml +37 -0
- data/spec/cassettes/OpenTok_Archives/should_create_an_archive_with_matching_multi_archive_tag_when_multiArchiveTag_is_specified.yml +50 -0
- data/spec/cassettes/OpenTok_Archives/should_create_an_archive_with_multi_archive_tag_value_of_nil_when_multiArchiveTag_not_specified.yml +49 -0
- data/spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml +52 -0
- data/spec/cassettes/OpenTok_Archives/should_create_layout_archives_with_screenshare_layout_types.yml +50 -0
- data/spec/cassettes/OpenTok_Broadcasts/adds_a_stream_to_a_broadcast.yml +37 -0
- data/spec/cassettes/OpenTok_Broadcasts/for_many_broadcasts/should_return_all_broadcasts.yml +192 -0
- data/spec/cassettes/OpenTok_Broadcasts/for_many_broadcasts/should_return_broadcasts_with_an_offset.yml +117 -0
- data/spec/cassettes/OpenTok_Broadcasts/for_many_broadcasts/should_return_count_number_of_broadcasts.yml +92 -0
- data/spec/cassettes/OpenTok_Broadcasts/for_many_broadcasts/should_return_part_of_the_broadcasts_when_using_offset_and_count.yml +142 -0
- data/spec/cassettes/OpenTok_Broadcasts/for_many_broadcasts/should_return_session_broadcasts.yml +117 -0
- data/spec/cassettes/OpenTok_Broadcasts/removes_a_stream_from_a_broadcast.yml +37 -0
- data/spec/cassettes/OpenTok_Broadcasts/starts_a_broadcast_with_a_matching_multi_broadcast_tag_value_when_multiBroadcastTag_is_specified.yml +54 -0
- data/spec/cassettes/OpenTok_Broadcasts/starts_a_broadcast_with_a_multi_broadcast_tag_value_of_nil_when_multiBroadcastTag_not_specified.yml +53 -0
- data/spec/cassettes/OpenTok_Broadcasts/starts_a_broadcast_with_a_specified_multiBroadcastTag.yml +54 -0
- data/spec/cassettes/OpenTok_Renders/finds_an_Experience_Composer_render.yml +46 -0
- data/spec/cassettes/OpenTok_Renders/for_many_renders/should_return_all_renders.yml +108 -0
- data/spec/cassettes/OpenTok_Renders/for_many_renders/should_return_count_number_of_renders.yml +63 -0
- data/spec/cassettes/OpenTok_Renders/for_many_renders/should_return_part_of_the_renders_when_using_offset_and_count.yml +63 -0
- data/spec/cassettes/OpenTok_Renders/for_many_renders/should_return_renders_with_an_offset.yml +74 -0
- data/spec/cassettes/OpenTok_Renders/starts_an_Experience_Composer_render.yml +48 -0
- data/spec/cassettes/OpenTok_Renders/stops_an_Experience_Composer_render.yml +28 -0
- data/spec/cassettes/OpenTok_Sip/_play_dtmf_to_connection/returns_a_200_response_code_when_passed_a_valid_dtmf_digit_string.yml +39 -0
- data/spec/cassettes/OpenTok_Sip/_play_dtmf_to_session/returns_a_200_response_code_when_passed_a_valid_dtmf_digit_string.yml +39 -0
- data/spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml +2 -2
- data/spec/cassettes/OpenTok_Streams/disables_the_mute_state_of_a_session.yml +37 -0
- data/spec/cassettes/OpenTok_Streams/forces_all_current_and_future_streams_in_a_session_to_be_muted.yml +39 -0
- data/spec/cassettes/OpenTok_Streams/forces_all_current_and_future_streams_in_a_session_to_be_muted_except_specified_excluded_streams.yml +39 -0
- data/spec/cassettes/OpenTok_Streams/forces_the_specified_stream_to_be_muted.yml +39 -0
- data/spec/opentok/archives_spec.rb +61 -0
- data/spec/opentok/broadcasts_spec.rb +157 -1
- data/spec/opentok/connection_spec.rb +1 -1
- data/spec/opentok/opentok_spec.rb +6 -0
- data/spec/opentok/renders_spec.rb +142 -0
- data/spec/opentok/sip_spec.rb +32 -1
- data/spec/opentok/streams_spec.rb +21 -1
- metadata +75 -7
- data/.travis.yml +0 -17
data/lib/opentok/streams.rb
CHANGED
@@ -4,7 +4,7 @@ require 'opentok/stream_list'
|
|
4
4
|
|
5
5
|
module OpenTok
|
6
6
|
# A class for working with OpenTok streams. It includes methods for getting info
|
7
|
-
# about OpenTok streams
|
7
|
+
# about OpenTok streams, for setting layout classes for streams, and for muting streams.
|
8
8
|
class Streams
|
9
9
|
# @private
|
10
10
|
def initialize(client)
|
@@ -75,5 +75,52 @@ module OpenTok
|
|
75
75
|
(200..300).include? response.code
|
76
76
|
end
|
77
77
|
|
78
|
+
# Force a specific stream connected to an OpenTok session to mute itself.
|
79
|
+
#
|
80
|
+
# @param [String] session_id The session ID of the OpenTok session.
|
81
|
+
# @param [String] stream_id The stream ID of the stream in the session.
|
82
|
+
#
|
83
|
+
def force_mute(session_id, stream_id)
|
84
|
+
response = @client.force_mute_stream(session_id, stream_id)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Force all streams connected to an OpenTok session (except for an optional list of streams),
|
88
|
+
# to mute published audio.
|
89
|
+
#
|
90
|
+
# In addition to existing streams, any streams that are published after the call to
|
91
|
+
# this method are published with audio muted. You can remove the mute state of a session
|
92
|
+
# by calling the disable_force_mute() method.
|
93
|
+
#
|
94
|
+
# @param [String] session_id The session ID.
|
95
|
+
# @param [Hash] opts An optional hash defining options for the muting action. For example:
|
96
|
+
# {
|
97
|
+
# "excluded_streams" => [
|
98
|
+
# "excludedStreamId1",
|
99
|
+
# "excludedStreamId2"
|
100
|
+
# ]
|
101
|
+
# }
|
102
|
+
# @option opts [Array] :excluded_streams The stream IDs for streams that should not be muted.
|
103
|
+
# This is an optional property. If you omit this property, all streams in the session will be muted.
|
104
|
+
#
|
105
|
+
def force_mute_all(session_id, opts = {})
|
106
|
+
opts['active'] = 'true'
|
107
|
+
response = @client.force_mute_session(session_id, opts)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Disables the active mute state of the session. After you call this method, new streams
|
111
|
+
# published to the session will no longer have audio muted.
|
112
|
+
#
|
113
|
+
# After you call the force_mute_all() method, any streams published after
|
114
|
+
# the call are published with audio muted. Call the disable_force_mute() method
|
115
|
+
# to remove the mute state of a session, so that new published streams are not
|
116
|
+
# automatically muted.
|
117
|
+
#
|
118
|
+
# @param [String] session_id The session ID.
|
119
|
+
#
|
120
|
+
def disable_force_mute(session_id)
|
121
|
+
opts = {'active' => 'false'}
|
122
|
+
response = @client.force_mute_session(session_id, opts)
|
123
|
+
end
|
124
|
+
|
78
125
|
end
|
79
|
-
end
|
126
|
+
end
|
data/lib/opentok/version.rb
CHANGED
data/opentok.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.description = %q{OpenTok is an API from TokBox that enables websites to weave live group video communication into their online experience. With OpenTok you have the freedom and flexibility to create the most engaging web experience for your users. This gem lets you generate sessions and tokens for OpenTok applications. It also includes support for working with OpenTok 2.0 archives. See <http://tokbox.com/opentok/platform> for more details.}
|
11
11
|
# TODO: this homepage isn't set up just yet
|
12
12
|
spec.homepage = "https://opentok.github.io/opentok-ruby-sdk"
|
13
|
+
spec.metadata = { "source_code_uri" => "https://github.com/opentok/OpenTok-Ruby-SDK" }
|
13
14
|
spec.license = "MIT"
|
14
15
|
|
15
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -18,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
18
19
|
|
19
20
|
bundler_version = RUBY_VERSION < '2.1' ? '~> 1.5' : '>= 1.5'
|
20
21
|
spec.add_development_dependency "bundler", bundler_version
|
21
|
-
spec.add_development_dependency "rake", "~> 12.
|
22
|
+
spec.add_development_dependency "rake", "~> 12.3.3"
|
22
23
|
spec.add_development_dependency "rspec", "~> 3.9.0"
|
23
24
|
spec.add_development_dependency "webmock", ">= 2.3.2"
|
24
25
|
spec.add_development_dependency "vcr", ">= 2.8.0"
|
data/sample/Broadcast/README.md
CHANGED
@@ -168,6 +168,48 @@ You will now see the participant in the broadcast.
|
|
168
168
|
end
|
169
169
|
```
|
170
170
|
|
171
|
+
### All broadcasts
|
172
|
+
|
173
|
+
Start by visiting the list page at <http://localhost:4567/all>. You will see a table that
|
174
|
+
displays all the broadcasts created with your API Key. If there are more than five, the next ones
|
175
|
+
can be seen by clicking the "Next →" link. Some basic information like
|
176
|
+
when the broadcast was created, how long it is, and its status is also shown. You should see the
|
177
|
+
broadcasts you created in the previous sections here.
|
178
|
+
|
179
|
+
We begin to see how this page is created by looking at the route handler for this URL:
|
180
|
+
|
181
|
+
```ruby
|
182
|
+
get '/all' do
|
183
|
+
page = (params[:page] || "1").to_i
|
184
|
+
offset = (page - 1) * 5
|
185
|
+
broadcasts = settings.opentok.broadcasts.all(:offset => offset, :count => 5)
|
186
|
+
|
187
|
+
show_previous = page > 1 ? '/all?page=' + (page-1).to_s : nil
|
188
|
+
show_next = broadcasts.total > (offset + 5) ? '/all?page=' + (page+1).to_s : nil
|
189
|
+
|
190
|
+
erb :all, :locals => {
|
191
|
+
:broadcasts => broadcasts,
|
192
|
+
:show_previous => show_previous,
|
193
|
+
:show_next => show_next
|
194
|
+
}
|
195
|
+
end
|
196
|
+
```
|
197
|
+
|
198
|
+
This view is paginated so that we don't potentially show hundreds of rows on the table, which would
|
199
|
+
be difficult for the user to navigate. So this code starts by figuring out which page needs to be
|
200
|
+
shown, where each page is a set of 5 broadcasts. The `page` number is read from the request's query
|
201
|
+
string parameters as a string and then converted into an Integer. The `offset`, which represents how
|
202
|
+
many broadcasts are being skipped is always calculated as five times as many pages that are less than
|
203
|
+
the current page, which is `(page - 1) * 5`. Now there is enough information to ask for a list of
|
204
|
+
broadcasts from OpenTok, which we do by calling the `broadcasts.all()` method of the `opentok` instance.
|
205
|
+
The parameter is an optional Hash that contains the offset, the count (which is always 5 in this
|
206
|
+
view). If we are not at the first page, we can pass the view a string that contains the relative URL
|
207
|
+
for the previous page. Similarly, we can also include one for the next page. Now the application
|
208
|
+
renders the view using that information and the partial list of broadcasts.
|
209
|
+
|
210
|
+
At this point the template file `views/all.erb` handles looping over the array of broadcasts and
|
211
|
+
outputting the proper information for each column in the table.
|
212
|
+
|
171
213
|
### Changing the layout classes for streams
|
172
214
|
|
173
215
|
In the host page, if you click on either the host or a participant video, that video gets
|
@@ -46,6 +46,21 @@ class BroadcastSample < Sinatra::Base
|
|
46
46
|
}
|
47
47
|
end
|
48
48
|
|
49
|
+
get '/all' do
|
50
|
+
page = (params[:page] || "1").to_i
|
51
|
+
offset = (page - 1) * 5
|
52
|
+
broadcasts = settings.opentok.broadcasts.all(:offset => offset, :count => 5)
|
53
|
+
|
54
|
+
show_previous = page > 1 ? '/all?page=' + (page-1).to_s : nil
|
55
|
+
show_next = broadcasts.total > (offset + 5) ? '/all?page=' + (page+1).to_s : nil
|
56
|
+
|
57
|
+
erb :all, :locals => {
|
58
|
+
:broadcasts => broadcasts,
|
59
|
+
:show_previous => show_previous,
|
60
|
+
:show_next => show_next
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
49
64
|
post '/start' do
|
50
65
|
opts = {
|
51
66
|
:maxDuration => params.key?("maxDuration") ? params[:maxDuration] : 7200,
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<div class="container bump-me">
|
2
|
+
|
3
|
+
<div class="body-content">
|
4
|
+
|
5
|
+
<div class="panel panel-default">
|
6
|
+
<div class="panel-heading">
|
7
|
+
<h3 class="panel-title">Broadcasts List</h3>
|
8
|
+
</div>
|
9
|
+
<div class="panel-body">
|
10
|
+
<% if broadcasts.count > 0 %>
|
11
|
+
<table class="table">
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<th>Created</th>
|
15
|
+
<th>Status</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% for item in broadcasts %>
|
20
|
+
|
21
|
+
<tr data-item-id="<%= item.id %>">
|
22
|
+
<td><%= Time.at(item.created_at/1000).strftime("%B %e, %Y at %I:%M %p") %></td>
|
23
|
+
<td><%= item.status %></td>
|
24
|
+
</tr>
|
25
|
+
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
<% else %>
|
30
|
+
<p>
|
31
|
+
There are no broadcasts currently. Try making one in the <a href="/host">host view</a>.
|
32
|
+
</p>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
<div class="panel-footer">
|
36
|
+
<% if show_previous %>
|
37
|
+
<a href="<%= show_previous %>" class="pull-left">← Previous</a>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if show_next %>
|
41
|
+
<a href="<%= show_next %>" class="pull-right">Next →</a>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
@@ -25,8 +25,23 @@
|
|
25
25
|
</div>
|
26
26
|
|
27
27
|
</div>
|
28
|
+
<div class="col-lg-6 col-offset-1">
|
29
|
+
|
30
|
+
<div class="panel panel-default">
|
31
|
+
<div class="panel-heading">List of Broadcasts</div>
|
32
|
+
<div class="panel-body">
|
33
|
+
<p>
|
34
|
+
Click through to List of Broadcasts to see examples of using the
|
35
|
+
Broadcasting REST API to list broadcasts showing status (started,
|
36
|
+
stopped, available) and created at timestamp.
|
37
|
+
</p>
|
38
|
+
</div>
|
39
|
+
<div class="panel-footer">
|
40
|
+
<a class="btn btn-success" href="all">List of Broadcasts</a>
|
41
|
+
</div>
|
42
|
+
</div>
|
28
43
|
|
29
44
|
</div>
|
30
45
|
|
31
46
|
</div>
|
32
|
-
</div>
|
47
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/archive/30b3ebf1-ba36-4f5b-8def-6f70d9986fe9/streams
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"addStream":"12312312-3811-4726-b508-e41a0f96c68f"}'
|
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: 204
|
23
|
+
message: No Content
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 23 Nov 2021 20:55:02 GMT
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- AWSALBTG=DuFUMmWLYpV+WXygU/vIF2GeEgO0ltb32OLXKREBQ059UXSGx826MWScm3+Iba9R/DrIu8wi8puQQB6HMDNNA5twML8KpmSno/CfRqigVEW7z7njwLdBeIjKowkK2oDiRCpWwn35G08EcNtdzJZUUO+Cqt/7MLfakD0RjBHzn0k0H6uk8Y4=;
|
33
|
+
Expires=Tue, 30 Nov 2021 20:55:02 GMT; Path=/
|
34
|
+
- AWSALBTGCORS=DuFUMmWLYpV+WXygU/vIF2GeEgO0ltb32OLXKREBQ059UXSGx826MWScm3+Iba9R/DrIu8wi8puQQB6HMDNNA5twML8KpmSno/CfRqigVEW7z7njwLdBeIjKowkK2oDiRCpWwn35G08EcNtdzJZUUO+Cqt/7MLfakD0RjBHzn0k0H6uk8Y4=;
|
35
|
+
Expires=Tue, 30 Nov 2021 20:55:02 GMT; Path=/; SameSite=None; Secure
|
36
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
37
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/archive/30b3ebf1-ba36-4f5b-8def-6f70d9986fe9/streams
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"removeStream":"12312312-3811-4726-b508-e41a0f96c68f"}'
|
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: 204
|
23
|
+
message: No Content
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 23 Nov 2021 20:55:03 GMT
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- AWSALBTG=C8HtbnHIrXFPcTucK+6zVh2r0MMrr/1Jb/WUzPKk5rAEw3LbnvwxrsMlwebeHFPZUj+lcnVMLZU91OiujdiYEUH5eBovMivdAk9Gd/O9f4iPju70zwCPrRaoMZnH3sFK6a8lG3Q966pXth4vEsvTA12tADiC2emPHC51Z75R51aQMKUxFPc=;
|
33
|
+
Expires=Tue, 30 Nov 2021 20:55:03 GMT; Path=/
|
34
|
+
- AWSALBTGCORS=C8HtbnHIrXFPcTucK+6zVh2r0MMrr/1Jb/WUzPKk5rAEw3LbnvwxrsMlwebeHFPZUj+lcnVMLZU91OiujdiYEUH5eBovMivdAk9Gd/O9f4iPju70zwCPrRaoMZnH3sFK6a8lG3Q966pXth4vEsvTA12tADiC2emPHC51Z75R51aQMKUxFPc=;
|
35
|
+
Expires=Tue, 30 Nov 2021 20:55:03 GMT; Path=/; SameSite=None; Secure
|
36
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
37
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,50 @@
|
|
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"}'
|
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
|
+
- Mon, 03 Oct 2022 10:19:16 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"createdAt" : 1395183243556,
|
38
|
+
"duration" : 0,
|
39
|
+
"id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
|
40
|
+
"name" : "",
|
41
|
+
"partnerId" : 123456,
|
42
|
+
"reason" : "",
|
43
|
+
"sessionId" : "SESSIONID",
|
44
|
+
"size" : 0,
|
45
|
+
"status" : "started",
|
46
|
+
"url" : null,
|
47
|
+
"multiArchiveTag":"archive-1"
|
48
|
+
}
|
49
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,49 @@
|
|
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"}'
|
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
|
+
- Mon, 03 Oct 2022 10:19:17 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"createdAt" : 1395183243556,
|
38
|
+
"duration" : 0,
|
39
|
+
"id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
|
40
|
+
"name" : "",
|
41
|
+
"partnerId" : 123456,
|
42
|
+
"reason" : "",
|
43
|
+
"sessionId" : "SESSIONID",
|
44
|
+
"size" : 0,
|
45
|
+
"status" : "started",
|
46
|
+
"url" : null
|
47
|
+
}
|
48
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
49
|
+
recorded_with: VCR 6.0.0
|
data/spec/cassettes/OpenTok_Archives/should_create_an_archives_with_a_specified_multiArchiveTag.yml
ADDED
@@ -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"}'
|
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, 07 Sep 2022 14:23:34 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
|
+
"multiArchiveTag":"archive-1"
|
50
|
+
}
|
51
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
52
|
+
recorded_with: VCR 6.0.0
|
data/spec/cassettes/OpenTok_Archives/should_create_layout_archives_with_screenshare_layout_types.yml
ADDED
@@ -0,0 +1,50 @@
|
|
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","layout":{"type":"bestFit","screenshare_type":"verticalPresentation"}}'
|
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: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
17
|
+
Accept: "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 17 Jan 2020 21:15:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"createdAt" : 1395183243556,
|
38
|
+
"duration" : 0,
|
39
|
+
"id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
|
40
|
+
"name" : "",
|
41
|
+
"partnerId" : 123456,
|
42
|
+
"reason" : "",
|
43
|
+
"sessionId" : "SESSIONID",
|
44
|
+
"size" : 0,
|
45
|
+
"status" : "started",
|
46
|
+
"url" : null
|
47
|
+
}
|
48
|
+
http_version:
|
49
|
+
recorded_at: Tue, 26 Jan 2021 09:01:36 GMT
|
50
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast/13dbcc23-af92-4862-9184-74b21815a814/streams
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"addStream":"12312312-3811-4726-b508-e41a0f96c68f"}'
|
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: 204
|
23
|
+
message: No Content
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 23 Nov 2021 20:44:18 GMT
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- AWSALBTG=Nj5lPQS/JnLA1JkA1AcUDSrn5vUxVtJ5srP+UHP/scSFLccYUClejVswu+NTMqGisdJi/7X/qdPMWBEq6ReBXCALUGz+NKunxs/WrIBFxBOz6EYgWkHXh8DY9Rtx2xEQmDzdCDqXIgr1aUzTv8J3taybWQm4yBpzHjFJFoUjpNYxS6+1zlI=;
|
33
|
+
Expires=Tue, 30 Nov 2021 20:44:18 GMT; Path=/
|
34
|
+
- AWSALBTGCORS=Nj5lPQS/JnLA1JkA1AcUDSrn5vUxVtJ5srP+UHP/scSFLccYUClejVswu+NTMqGisdJi/7X/qdPMWBEq6ReBXCALUGz+NKunxs/WrIBFxBOz6EYgWkHXh8DY9Rtx2xEQmDzdCDqXIgr1aUzTv8J3taybWQm4yBpzHjFJFoUjpNYxS6+1zlI=;
|
35
|
+
Expires=Tue, 30 Nov 2021 20:44:18 GMT; Path=/; SameSite=None; Secure
|
36
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
37
|
+
recorded_with: VCR 6.0.0
|