opentok 3.0.3 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/metrics.yml +17 -0
- data/.travis.yml +3 -1
- data/CODE_OF_CONDUCT.md +128 -0
- data/README.md +312 -28
- data/lib/opentok/archive.rb +45 -4
- data/lib/opentok/archives.rb +73 -5
- data/lib/opentok/broadcast.rb +118 -0
- data/lib/opentok/broadcasts.rb +149 -0
- data/lib/opentok/client.rb +212 -7
- data/lib/opentok/connections.rb +28 -0
- data/lib/opentok/constants.rb +1 -1
- data/lib/opentok/exceptions.rb +6 -0
- data/lib/opentok/opentok.rb +44 -10
- data/lib/opentok/session.rb +5 -0
- data/lib/opentok/signals.rb +47 -0
- data/lib/opentok/sip.rb +33 -0
- data/lib/opentok/stream.rb +46 -0
- data/lib/opentok/stream_list.rb +18 -0
- data/lib/opentok/streams.rb +79 -0
- data/lib/opentok/version.rb +1 -1
- data/opentok.gemspec +9 -8
- data/sample/Broadcast/Gemfile +4 -0
- data/sample/Broadcast/README.md +201 -0
- data/sample/Broadcast/broadcast_sample.rb +97 -0
- data/sample/Broadcast/public/css/sample.css +64 -0
- data/sample/Broadcast/public/js/host.js +185 -0
- data/sample/Broadcast/public/js/participant.js +85 -0
- data/sample/Broadcast/views/host.erb +82 -0
- data/sample/Broadcast/views/index.erb +32 -0
- data/sample/Broadcast/views/layout.erb +29 -0
- data/sample/Broadcast/views/participant.erb +27 -0
- data/sample/HelloWorld/public/js/helloworld.js +4 -10
- data/sample/HelloWorld/views/index.erb +1 -3
- data/spec/cassettes/OpenTok_Archives/calls_layout_on_archive_object.yml +47 -0
- data/spec/cassettes/OpenTok_Archives/changes_the_layout_of_an_archive.yml +38 -0
- data/spec/cassettes/OpenTok_Archives/http_client_errors/.yml +34 -0
- data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_create_custom_layout_archives.yml +50 -0
- data/spec/cassettes/OpenTok_Archives/should_create_hd_archives.yml +54 -0
- data/spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_find_archives_with_unknown_properties.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_find_expired_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_find_paused_archives_by_id.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +3 -1
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_session_archives.yml +3 -1
- data/spec/cassettes/OpenTok_Broadcasts/calls_layout_on_broadcast_object.yml +57 -0
- data/spec/cassettes/OpenTok_Broadcasts/changes_the_layout_of_a_broadcast.yml +38 -0
- data/spec/cassettes/OpenTok_Broadcasts/fetches_a_hls_broadcast_url.yml +52 -0
- data/spec/cassettes/OpenTok_Broadcasts/finds_a_broadcast.yml +57 -0
- data/spec/cassettes/OpenTok_Broadcasts/starts_a_rtmp_broadcast.yml +61 -0
- data/spec/cassettes/OpenTok_Broadcasts/stops_a_broadcast.yml +47 -0
- data/spec/cassettes/OpenTok_Connections/forces_a_connection_to_be_terminated.yml +38 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_for_invalid_media_modes.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +3 -1
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +3 -1
- 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
- data/spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_a_connection.yml +39 -0
- data/spec/cassettes/OpenTok_Signals/receives_a_valid_response_for_all_connections.yml +39 -0
- data/spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml +3 -1
- data/spec/cassettes/OpenTok_Streams/get_all_streams_information.yml +55 -0
- data/spec/cassettes/OpenTok_Streams/get_specific_stream_information.yml +44 -0
- data/spec/cassettes/OpenTok_Streams/layout_working_on_two_stream_list.yml +38 -0
- data/spec/opentok/archives_spec.rb +84 -1
- data/spec/opentok/broadcasts_spec.rb +171 -0
- data/spec/opentok/client_spec.rb +51 -0
- data/spec/opentok/connection_spec.rb +38 -0
- data/spec/opentok/opentok_spec.rb +21 -0
- data/spec/opentok/signal_spec.rb +50 -0
- data/spec/opentok/streams_spec.rb +75 -0
- data/spec/spec_helper.rb +2 -0
- metadata +84 -22
@@ -7,9 +7,11 @@ http_interactions:
|
|
7
7
|
User-Agent:
|
8
8
|
- OpenTok-Ruby-SDK/<%= version %>
|
9
9
|
X-Opentok-Auth:
|
10
|
-
-
|
10
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
11
11
|
Content-Type:
|
12
12
|
- application/json
|
13
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
14
|
+
Accept: "*/*"
|
13
15
|
response:
|
14
16
|
status:
|
15
17
|
code: 200
|
data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml
CHANGED
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast/13dbcc23-af92-4862-9184-74b21815a814
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OpenTok-Ruby-SDK/<%= version %>
|
12
|
+
X-Opentok-Auth:
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Fri, 28 Sep 2018 20:45:36 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: |-
|
32
|
+
{
|
33
|
+
"id":"13dbcc23-af92-4862-9184-74b21815a814",
|
34
|
+
"sessionId":"SESSIONID",
|
35
|
+
"projectId":123456,
|
36
|
+
"createdAt":1538160235541,
|
37
|
+
"broadcastUrls":{
|
38
|
+
"rtmp":[
|
39
|
+
{
|
40
|
+
"status":"live",
|
41
|
+
"id":"rubyTestStream",
|
42
|
+
"serverUrl":"rtmp://x.rtmp.youtube.com/live2",
|
43
|
+
"streamName":"66c9-jwuh-pquf-9x18"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"hls":"https://cdn-broadcast001-pdx.tokbox.com/14935/14935_77e4e8e8-0c8b-4cea-b579-0560875f7123.smil/playlist.m3u8"
|
47
|
+
},
|
48
|
+
"updatedAt":1538160235541,
|
49
|
+
"status":"started",
|
50
|
+
"maxDuration":7200,
|
51
|
+
"resolution":"640x480",
|
52
|
+
"partnerId":123456,
|
53
|
+
"event":"broadcast"
|
54
|
+
}
|
55
|
+
http_version:
|
56
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
57
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast/13dbcc23-af92-4862-9184-74b21815a814/layout
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"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, 28 Sep 2018 20:40:56 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Content-Length:
|
32
|
+
- '73'
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"code":-1,"message":"Issuer not found","description":"Issuer not found"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"sessionId":"SESSIONID","outputs":{"hls":{}}}'
|
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
|
+
- Thu, 27 Sep 2018 22:34:34 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"id":"BROADCASTID",
|
36
|
+
"sessionId":"SESSIONID",
|
37
|
+
"projectId":123456,
|
38
|
+
"createdAt":1538086900154,
|
39
|
+
"broadcastUrls":
|
40
|
+
{
|
41
|
+
"hls":"https://cdn-broadcast001-pdx.tokbox.com/14787/14787_b930bf08-1c9f-4c55-ab04-7d192578c057.smil/playlist.m3u8"
|
42
|
+
},
|
43
|
+
"updatedAt":1538086900489,
|
44
|
+
"status":"started",
|
45
|
+
"maxDuration":7200,
|
46
|
+
"resolution":"640x480",
|
47
|
+
"partnerId":100,
|
48
|
+
"event":"broadcast"
|
49
|
+
}
|
50
|
+
http_version:
|
51
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
52
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast/13dbcc23-af92-4862-9184-74b21815a814
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OpenTok-Ruby-SDK/<%= version %>
|
12
|
+
X-Opentok-Auth:
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Fri, 28 Sep 2018 18:46:21 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: |-
|
32
|
+
{
|
33
|
+
"id":"13dbcc23-af92-4862-9184-74b21815a814",
|
34
|
+
"sessionId":"SESSIONID",
|
35
|
+
"projectId":123456,
|
36
|
+
"createdAt":1538160235541,
|
37
|
+
"broadcastUrls":{
|
38
|
+
"rtmp":[
|
39
|
+
{
|
40
|
+
"status":"live",
|
41
|
+
"id":"rubyTestStream",
|
42
|
+
"serverUrl":"rtmp://x.rtmp.youtube.com/live2",
|
43
|
+
"streamName":"66c9-jwuh-pquf-9x18"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"hls":"https://cdn-broadcast001-pdx.tokbox.com/14935/14935_77e4e8e8-0c8b-4cea-b579-0560875f7123.smil/playlist.m3u8"
|
47
|
+
},
|
48
|
+
"updatedAt":1538160235541,
|
49
|
+
"status":"started",
|
50
|
+
"maxDuration":7200,
|
51
|
+
"resolution":"640x480",
|
52
|
+
"partnerId":123456,
|
53
|
+
"event":"broadcast"
|
54
|
+
}
|
55
|
+
http_version:
|
56
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
57
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"sessionId":"SESSIONID","outputs":{"hls":{},"rtmp":[{"id":"rubyTestStream","serverUrl":"rtmp://x.rtmp.youtube.com/live2","streamName":"66c9-jwuh-pquf-9x18"}]}}'
|
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
|
+
- Thu, 27 Sep 2018 23:10:28 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"id":"BROADCASTID",
|
36
|
+
"sessionId":"SESSIONID",
|
37
|
+
"projectId":123456,
|
38
|
+
"createdAt":1538086900154,
|
39
|
+
"broadcastUrls":
|
40
|
+
{
|
41
|
+
"hls":"https://cdn-broadcast001-pdx.tokbox.com/14787/14787_b930bf08-1c9f-4c55-ab04-7d192578c057.smil/playlist.m3u8",
|
42
|
+
"rtmp":
|
43
|
+
[
|
44
|
+
{
|
45
|
+
"status":"connecting",
|
46
|
+
"id":"rubyTestStream",
|
47
|
+
"serverUrl":"rtmp://x.rtmp.youtube.com/live2",
|
48
|
+
"streamName":"66c9-jwuh-pquf-9x18"
|
49
|
+
}
|
50
|
+
]
|
51
|
+
},
|
52
|
+
"updatedAt":1538086900489,
|
53
|
+
"status":"started",
|
54
|
+
"maxDuration":7200,
|
55
|
+
"resolution":"640x480",
|
56
|
+
"partnerId":100,
|
57
|
+
"event":"broadcast"
|
58
|
+
}
|
59
|
+
http_version:
|
60
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
61
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/broadcast/13dbcc23-af92-4862-9184-74b21815a814/stop
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OpenTok-Ruby-SDK/<%= version %>
|
12
|
+
X-Opentok-Auth:
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Fri, 28 Sep 2018 19:23:21 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: |-
|
32
|
+
{
|
33
|
+
"id":"13dbcc23-af92-4862-9184-74b21815a814",
|
34
|
+
"sessionId":"SESSIONID",
|
35
|
+
"projectId":123456,
|
36
|
+
"createdAt":1538162113387,
|
37
|
+
"broadcastUrls":null,
|
38
|
+
"updatedAt":1538162113387,
|
39
|
+
"status":"stopped",
|
40
|
+
"maxDuration":7200,
|
41
|
+
"resolution":"640x480",
|
42
|
+
"event":"broadcast",
|
43
|
+
"partnerId":123456
|
44
|
+
}
|
45
|
+
http_version:
|
46
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
47
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://api.opentok.com/v2/project/123456/session/SESSIONID/connection/CONNID
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
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: 204
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Wed, 29 Aug 2018 19:41:26 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Content-Length:
|
32
|
+
- '73'
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"code":-1,"message":"Issuer not found","description":"Issuer not found"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 18 Apr 2017 10:17:40 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
@@ -10,7 +10,9 @@ http_interactions:
|
|
10
10
|
User-Agent:
|
11
11
|
- OpenTok-Ruby-SDK/<%= version %>
|
12
12
|
X-Opentok-Auth:
|
13
|
-
-
|
13
|
+
- eyJpc3QiOiJwcm9qZWN0IiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiIxMjM0NTYiLCJpYXQiOjE0OTI1MTA2NjAsImV4cCI6MTQ5MjUxMDk2MH0.BplMVhJWx4ld7KLKXqEmow6MjNPPFw9W8IHCMfeb120
|
14
|
+
Accept-Encoding: "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
|
15
|
+
Accept: "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|