opentok 0.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +16 -2
- data/.travis.yml +6 -0
- data/.yardopts +1 -0
- data/CONTRIBUTING.md +47 -0
- data/DEVELOPING.md +91 -0
- data/LICENSE +19 -5
- data/README.md +170 -53
- data/Rakefile +10 -5
- data/doc/OpenTok.html +411 -0
- data/doc/OpenTok/Archive.html +1320 -0
- data/doc/OpenTok/ArchiveList.html +216 -0
- data/doc/OpenTok/Archives.html +1028 -0
- data/doc/OpenTok/Client.html +695 -0
- data/doc/OpenTok/OpenTok.html +1046 -0
- data/doc/OpenTok/OpenTokArchiveError.html +142 -0
- data/doc/OpenTok/OpenTokAuthenticationError.html +143 -0
- data/doc/OpenTok/OpenTokError.html +138 -0
- data/doc/OpenTok/Session.html +665 -0
- data/doc/OpenTok/TokenGenerator.html +204 -0
- data/doc/OpenTok/TokenGenerator/ClassMethods.html +187 -0
- data/doc/README.md +15 -0
- data/doc/_index.html +182 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +87 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +87 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +227 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/opentok.rb +3 -14
- data/lib/opentok/archive.rb +92 -0
- data/lib/opentok/archive_list.rb +17 -0
- data/lib/opentok/archives.rb +120 -0
- data/lib/opentok/client.rb +125 -0
- data/lib/opentok/constants.rb +5 -0
- data/lib/opentok/exceptions.rb +10 -0
- data/lib/opentok/opentok.rb +174 -0
- data/lib/opentok/session.rb +76 -0
- data/lib/opentok/token_generator.rb +101 -0
- data/lib/opentok/version.rb +4 -0
- data/opentok.gemspec +29 -22
- data/sample/Archiving/Gemfile +4 -0
- data/sample/Archiving/README.md +212 -0
- data/sample/Archiving/archiving_sample.rb +80 -0
- data/sample/Archiving/public/css/sample.css +22 -0
- data/sample/Archiving/public/img/archiving-off.png +0 -0
- data/sample/Archiving/public/img/archiving-on-idle.png +0 -0
- data/sample/Archiving/public/img/archiving-on-message.png +0 -0
- data/sample/Archiving/public/js/host.js +37 -0
- data/sample/Archiving/public/js/participant.js +13 -0
- data/sample/Archiving/views/history.erb +65 -0
- data/sample/Archiving/views/host.erb +69 -0
- data/sample/Archiving/views/index.erb +48 -0
- data/sample/Archiving/views/layout.erb +29 -0
- data/sample/Archiving/views/participant.erb +55 -0
- data/sample/HelloWorld/Gemfile +4 -0
- data/sample/HelloWorld/README.md +123 -0
- data/sample/HelloWorld/hello_world.rb +27 -0
- data/sample/HelloWorld/public/js/helloworld.js +32 -0
- data/sample/HelloWorld/views/index.erb +21 -0
- data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +48 -0
- data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +49 -0
- data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +32 -0
- data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +46 -0
- data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +48 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +104 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +71 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +60 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +82 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +39 -0
- data/spec/matchers/token.rb +48 -0
- data/spec/opentok/archives_spec.rb +91 -0
- data/spec/opentok/opentok_spec.rb +144 -0
- data/spec/opentok/session_spec.rb +71 -0
- data/spec/shared/opentok_generates_tokens.rb +62 -0
- data/spec/shared/session_generates_tokens.rb +63 -0
- data/spec/spec_helper.rb +6 -7
- metadata +197 -59
- data/.rspec +0 -3
- data/CHANGES +0 -33
- data/doc/reference.md +0 -122
- data/lib/open_tok/archive.rb +0 -53
- data/lib/open_tok/archive_timeline_event.rb +0 -22
- data/lib/open_tok/archive_video_resource.rb +0 -28
- data/lib/open_tok/exception.rb +0 -50
- data/lib/open_tok/open_tok_sdk.rb +0 -198
- data/lib/open_tok/request.rb +0 -63
- data/lib/open_tok/role_constants.rb +0 -18
- data/lib/open_tok/session.rb +0 -25
- data/lib/open_tok/session_property_constants.rb +0 -30
- data/lib/open_tok/utils.rb +0 -10
- data/lib/open_tok/version.rb +0 -5
- data/sample/sample.rb +0 -26
- data/spec/cassettes/archives.yml +0 -83
- data/spec/cassettes/deleteArchive.yml +0 -91
- data/spec/cassettes/invalidSession.yml +0 -41
- data/spec/cassettes/session.yml +0 -46
- data/spec/cassettes/stitchArchive.yml +0 -42
- data/spec/opentok_exception_spec.rb +0 -38
- data/spec/opentok_spec.rb +0 -135
metadata
CHANGED
@@ -1,132 +1,254 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stijn Mathysen
|
8
8
|
- Karmen Blake
|
9
9
|
- Song Zheng
|
10
|
+
- Patrick Quinn-Graham
|
11
|
+
- Ankur Oberoi
|
10
12
|
autorequire:
|
11
13
|
bindir: bin
|
12
14
|
cert_chain: []
|
13
|
-
date: 2014-
|
15
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
14
16
|
dependencies:
|
15
17
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
18
|
+
name: bundler
|
17
19
|
requirement: !ruby/object:Gem::Requirement
|
18
20
|
requirements:
|
19
|
-
- -
|
21
|
+
- - ~>
|
20
22
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
22
|
-
type: :
|
23
|
+
version: '1.5'
|
24
|
+
type: :development
|
23
25
|
prerelease: false
|
24
26
|
version_requirements: !ruby/object:Gem::Requirement
|
25
27
|
requirements:
|
26
|
-
- -
|
28
|
+
- - ~>
|
27
29
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
30
|
+
version: '1.5'
|
29
31
|
- !ruby/object:Gem::Dependency
|
30
32
|
name: rake
|
31
33
|
requirement: !ruby/object:Gem::Requirement
|
32
34
|
requirements:
|
33
|
-
- -
|
35
|
+
- - ~>
|
34
36
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
37
|
+
version: 10.1.1
|
36
38
|
type: :development
|
37
39
|
prerelease: false
|
38
40
|
version_requirements: !ruby/object:Gem::Requirement
|
39
41
|
requirements:
|
40
|
-
- -
|
42
|
+
- - ~>
|
41
43
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
44
|
+
version: 10.1.1
|
43
45
|
- !ruby/object:Gem::Dependency
|
44
46
|
name: rspec
|
45
47
|
requirement: !ruby/object:Gem::Requirement
|
46
48
|
requirements:
|
47
|
-
- -
|
49
|
+
- - ~>
|
48
50
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
51
|
+
version: 2.14.1
|
50
52
|
type: :development
|
51
53
|
prerelease: false
|
52
54
|
version_requirements: !ruby/object:Gem::Requirement
|
53
55
|
requirements:
|
54
|
-
- -
|
56
|
+
- - ~>
|
55
57
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
58
|
+
version: 2.14.1
|
57
59
|
- !ruby/object:Gem::Dependency
|
58
60
|
name: webmock
|
59
61
|
requirement: !ruby/object:Gem::Requirement
|
60
62
|
requirements:
|
61
|
-
- -
|
63
|
+
- - ~>
|
62
64
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
65
|
+
version: 1.17.4
|
64
66
|
type: :development
|
65
67
|
prerelease: false
|
66
68
|
version_requirements: !ruby/object:Gem::Requirement
|
67
69
|
requirements:
|
68
|
-
- -
|
70
|
+
- - ~>
|
69
71
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
72
|
+
version: 1.17.4
|
71
73
|
- !ruby/object:Gem::Dependency
|
72
74
|
name: vcr
|
73
75
|
requirement: !ruby/object:Gem::Requirement
|
74
76
|
requirements:
|
75
|
-
- -
|
77
|
+
- - ~>
|
76
78
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
79
|
+
version: 2.8.0
|
78
80
|
type: :development
|
79
81
|
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 2.8.0
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: yard
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.8.7
|
94
|
+
type: :development
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ~>
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 0.8.7
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: addressable
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ~>
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 2.3.5
|
108
|
+
type: :runtime
|
109
|
+
prerelease: false
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ~>
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.3.5
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: httparty
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - '='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: 0.13.0
|
122
|
+
type: :runtime
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - '='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.13.0
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: activesupport
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '3.2'
|
136
|
+
type: :runtime
|
137
|
+
prerelease: false
|
80
138
|
version_requirements: !ruby/object:Gem::Requirement
|
81
139
|
requirements:
|
82
140
|
- - '>='
|
83
141
|
- !ruby/object:Gem::Version
|
84
|
-
version: '
|
142
|
+
version: '3.2'
|
85
143
|
description: OpenTok is an API from TokBox that enables websites to weave live group
|
86
144
|
video communication into their online experience. With OpenTok you have the freedom
|
87
|
-
and flexibility to create the most engaging web experience for your users.
|
88
|
-
|
89
|
-
|
145
|
+
and flexibility to create the most engaging web experience for your users. This
|
146
|
+
gem lets you generate sessions and tokens for OpenTok applications. It also includes
|
147
|
+
support for working with OpenTok 2.0 archives. See <http://tokbox.com/opentok/platform>
|
148
|
+
for more details.
|
90
149
|
email:
|
91
150
|
- stijn@skylight.be
|
92
151
|
- karmenblake@gmail.com
|
93
152
|
- song@tokbox.com
|
153
|
+
- pqg@tokbox.com
|
154
|
+
- ankur@tokbox.com
|
94
155
|
executables: []
|
95
156
|
extensions: []
|
96
157
|
extra_rdoc_files: []
|
97
158
|
files:
|
98
159
|
- .gitignore
|
99
|
-
- .
|
100
|
-
-
|
160
|
+
- .travis.yml
|
161
|
+
- .yardopts
|
162
|
+
- CONTRIBUTING.md
|
163
|
+
- DEVELOPING.md
|
101
164
|
- Gemfile
|
102
165
|
- LICENSE
|
103
166
|
- README.md
|
104
167
|
- Rakefile
|
105
|
-
- doc/
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
168
|
+
- doc/OpenTok.html
|
169
|
+
- doc/OpenTok/Archive.html
|
170
|
+
- doc/OpenTok/ArchiveList.html
|
171
|
+
- doc/OpenTok/Archives.html
|
172
|
+
- doc/OpenTok/Client.html
|
173
|
+
- doc/OpenTok/OpenTok.html
|
174
|
+
- doc/OpenTok/OpenTokArchiveError.html
|
175
|
+
- doc/OpenTok/OpenTokAuthenticationError.html
|
176
|
+
- doc/OpenTok/OpenTokError.html
|
177
|
+
- doc/OpenTok/Session.html
|
178
|
+
- doc/OpenTok/TokenGenerator.html
|
179
|
+
- doc/OpenTok/TokenGenerator/ClassMethods.html
|
180
|
+
- doc/README.md
|
181
|
+
- doc/_index.html
|
182
|
+
- doc/class_list.html
|
183
|
+
- doc/css/common.css
|
184
|
+
- doc/css/full_list.css
|
185
|
+
- doc/css/style.css
|
186
|
+
- doc/file.README.html
|
187
|
+
- doc/file_list.html
|
188
|
+
- doc/frames.html
|
189
|
+
- doc/index.html
|
190
|
+
- doc/js/app.js
|
191
|
+
- doc/js/full_list.js
|
192
|
+
- doc/js/jquery.js
|
193
|
+
- doc/method_list.html
|
194
|
+
- doc/top-level-namespace.html
|
117
195
|
- lib/opentok.rb
|
196
|
+
- lib/opentok/archive.rb
|
197
|
+
- lib/opentok/archive_list.rb
|
198
|
+
- lib/opentok/archives.rb
|
199
|
+
- lib/opentok/client.rb
|
200
|
+
- lib/opentok/constants.rb
|
201
|
+
- lib/opentok/exceptions.rb
|
202
|
+
- lib/opentok/opentok.rb
|
203
|
+
- lib/opentok/session.rb
|
204
|
+
- lib/opentok/token_generator.rb
|
205
|
+
- lib/opentok/version.rb
|
118
206
|
- opentok.gemspec
|
119
|
-
- sample/
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
126
|
-
-
|
207
|
+
- sample/Archiving/Gemfile
|
208
|
+
- sample/Archiving/README.md
|
209
|
+
- sample/Archiving/archiving_sample.rb
|
210
|
+
- sample/Archiving/public/css/sample.css
|
211
|
+
- sample/Archiving/public/img/archiving-off.png
|
212
|
+
- sample/Archiving/public/img/archiving-on-idle.png
|
213
|
+
- sample/Archiving/public/img/archiving-on-message.png
|
214
|
+
- sample/Archiving/public/js/host.js
|
215
|
+
- sample/Archiving/public/js/participant.js
|
216
|
+
- sample/Archiving/views/history.erb
|
217
|
+
- sample/Archiving/views/host.erb
|
218
|
+
- sample/Archiving/views/index.erb
|
219
|
+
- sample/Archiving/views/layout.erb
|
220
|
+
- sample/Archiving/views/participant.erb
|
221
|
+
- sample/HelloWorld/Gemfile
|
222
|
+
- sample/HelloWorld/README.md
|
223
|
+
- sample/HelloWorld/hello_world.rb
|
224
|
+
- sample/HelloWorld/public/js/helloworld.js
|
225
|
+
- sample/HelloWorld/views/index.erb
|
226
|
+
- spec/cassettes/OpenTok_Archives/should_create_archives.yml
|
227
|
+
- spec/cassettes/OpenTok_Archives/should_create_named_archives.yml
|
228
|
+
- spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml
|
229
|
+
- spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml
|
230
|
+
- spec/cassettes/OpenTok_Archives/should_stop_archives.yml
|
231
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml
|
232
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml
|
233
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml
|
234
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml
|
235
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml
|
236
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml
|
237
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml
|
238
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml
|
239
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml
|
240
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml
|
241
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml
|
242
|
+
- spec/matchers/token.rb
|
243
|
+
- spec/opentok/archives_spec.rb
|
244
|
+
- spec/opentok/opentok_spec.rb
|
245
|
+
- spec/opentok/session_spec.rb
|
246
|
+
- spec/shared/opentok_generates_tokens.rb
|
247
|
+
- spec/shared/session_generates_tokens.rb
|
127
248
|
- spec/spec_helper.rb
|
128
|
-
homepage: https://github.
|
129
|
-
licenses:
|
249
|
+
homepage: https://opentok.github.io/opentok-ruby-sdk
|
250
|
+
licenses:
|
251
|
+
- MIT
|
130
252
|
metadata: {}
|
131
253
|
post_install_message:
|
132
254
|
rdoc_options: []
|
@@ -143,17 +265,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
265
|
- !ruby/object:Gem::Version
|
144
266
|
version: '0'
|
145
267
|
requirements: []
|
146
|
-
rubyforge_project:
|
268
|
+
rubyforge_project:
|
147
269
|
rubygems_version: 2.0.14
|
148
270
|
signing_key:
|
149
271
|
specification_version: 4
|
150
|
-
summary: OpenTok
|
272
|
+
summary: Ruby gem for the OpenTok API
|
151
273
|
test_files:
|
152
|
-
- spec/cassettes/
|
153
|
-
- spec/cassettes/
|
154
|
-
- spec/cassettes/
|
155
|
-
- spec/cassettes/
|
156
|
-
- spec/cassettes/
|
157
|
-
- spec/
|
158
|
-
- spec/
|
274
|
+
- spec/cassettes/OpenTok_Archives/should_create_archives.yml
|
275
|
+
- spec/cassettes/OpenTok_Archives/should_create_named_archives.yml
|
276
|
+
- spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml
|
277
|
+
- spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml
|
278
|
+
- spec/cassettes/OpenTok_Archives/should_stop_archives.yml
|
279
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml
|
280
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml
|
281
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml
|
282
|
+
- spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml
|
283
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml
|
284
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml
|
285
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml
|
286
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml
|
287
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml
|
288
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml
|
289
|
+
- spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml
|
290
|
+
- spec/matchers/token.rb
|
291
|
+
- spec/opentok/archives_spec.rb
|
292
|
+
- spec/opentok/opentok_spec.rb
|
293
|
+
- spec/opentok/session_spec.rb
|
294
|
+
- spec/shared/opentok_generates_tokens.rb
|
295
|
+
- spec/shared/session_generates_tokens.rb
|
159
296
|
- spec/spec_helper.rb
|
297
|
+
has_rdoc:
|
data/.rspec
DELETED
data/CHANGES
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
= Change Log
|
2
|
-
|
3
|
-
== Version 0.0.8
|
4
|
-
|
5
|
-
* Removed references to the staging environment as it no longer exists
|
6
|
-
|
7
|
-
== Version 0.0.73
|
8
|
-
|
9
|
-
* Added stitchArchive functionality
|
10
|
-
* Updated Test Cases ( thanks to https://github.com/rlivsey )
|
11
|
-
* Download Archive duplication and error catching ( thanks to https://github.com/muescha )
|
12
|
-
|
13
|
-
== Version 0.0.5
|
14
|
-
|
15
|
-
* Added connection_data to generate token method (thanks to https://github.com/jonmumm)
|
16
|
-
|
17
|
-
== Version 0.0.4
|
18
|
-
|
19
|
-
* Thanks to Ruslan Doroshenko (https://github.com/rdoroshenko) for adding the P2P constant to the SDK.
|
20
|
-
|
21
|
-
== Version 0.0.3
|
22
|
-
|
23
|
-
* minor fixes to the documentation
|
24
|
-
|
25
|
-
== Version 0.0.2
|
26
|
-
|
27
|
-
* Code cleanup
|
28
|
-
* Included missing files
|
29
|
-
* adding basic tests and documentation
|
30
|
-
|
31
|
-
== Version 0.0.1
|
32
|
-
|
33
|
-
Initial version
|
data/doc/reference.md
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
OpenTok Ruby SDK reference
|
2
|
-
==========================
|
3
|
-
|
4
|
-
You need to instantiate an OpenTokSDK object before calling any of its methods.
|
5
|
-
To create a new OpenTokSDK object, call the OpenTokSDK constructor with the API key
|
6
|
-
and the API secret TokBox issued you. (You get an API key when you
|
7
|
-
<a href="https://dashboard.tokbox.com/users/sign_in">sign up</a> for an OpenTok account.) Do not reveal
|
8
|
-
your API secret string. You use it with the OpenTokSDK constructor (only on your web
|
9
|
-
server) to create OpenTok sessions.
|
10
|
-
|
11
|
-
API_KEY = '' # should be a string
|
12
|
-
API_SECRET = '' # should be a string
|
13
|
-
OTSDK = OpenTok::OpenTokSDK.new API_KEY, API_SECRET
|
14
|
-
|
15
|
-
create_session() method
|
16
|
-
-----------------------
|
17
|
-
The `create_session()` method of the OpenTokSDK object to create a new OpenTok
|
18
|
-
session and obtain a session ID.
|
19
|
-
|
20
|
-
The `create_session()` method has the following parameters:
|
21
|
-
|
22
|
-
* `location` (String) — An IP address that TokBox will use to situate the session in its global network.
|
23
|
-
In general, you should not pass in a location hint (or pass in nil); if no location hint is passed in, the session
|
24
|
-
uses a media server based on the location of the first client connecting to the session. Pass a location hint in only
|
25
|
-
if you know the general geographic region (and a representative IP address) and you think the first client connecting
|
26
|
-
may not be in that region.
|
27
|
-
|
28
|
-
* `properties` (Object) — Optional. An object used to define
|
29
|
-
peer-to-peer preferences for the session. The `properties` option includes one property —
|
30
|
-
`p2p.preference` (a string). This property determines whether the session's streams will
|
31
|
-
be transmitted directly between peers. You can set the following possible values:
|
32
|
-
|
33
|
-
* "disabled" (the default) — The session's streams will all be relayed using the OpenTok media server.
|
34
|
-
<br><br>
|
35
|
-
**In OpenTok v2:** The <a href="http://www.tokbox.com/blog/mantis-next-generation-cloud-technology-for-webrtc/">OpenTok
|
36
|
-
media server</a> provides benefits not available in peer-to-peer sessions. For example, the OpenTok media server can
|
37
|
-
decrease bandwidth usage in multiparty sessions. Also, the OpenTok server can improve the quality of the user experience
|
38
|
-
through <a href="http://www.tokbox.com/blog/quality-of-experience-and-traffic-shaping-the-next-step-with-mantis/">dynamic
|
39
|
-
traffic shaping</a>. For information on pricing, see the <a href="http://www.tokbox.com/pricing">OpenTok pricing page</a>.
|
40
|
-
|
41
|
-
* "enabled" — The session will attempt to transmit streams directly between clients.
|
42
|
-
<br><br>
|
43
|
-
**In OpenTok v1:** Peer-to-peer streaming decreases latency and improves quality. If peer-to-peer streaming
|
44
|
-
fails (either when streams are initially published or during the course of a session), the session falls back to using
|
45
|
-
the OpenTok media server to relaying streams. (Peer-to-peer streaming uses UDP, which may be blocked by a firewall.)
|
46
|
-
For a session created with peer-to-peer streaming enabled, only two clients can connect to the session at a time.
|
47
|
-
If an additional client attempts to connect, the TB object on the client dispatches an exception event.
|
48
|
-
|
49
|
-
|
50
|
-
The `create_session` method returns a Session object. This
|
51
|
-
object includes a `sessionID` property, which is the session ID for the
|
52
|
-
new session. For example, when using the OpenTok JavaScript library, use this
|
53
|
-
session ID in JavaScript on the page that you serve to the client.
|
54
|
-
The JavaScript will use this value when calling the `connect()`
|
55
|
-
method of the Session object (to connect a user to an OpenTok session).
|
56
|
-
|
57
|
-
OpenTok sessions do not expire. However, authentication tokens do expire (see the next section on the
|
58
|
-
generate_token() method.) Also note that sessions cannot explicitly be destroyed.
|
59
|
-
|
60
|
-
Calling the `create_session()` method results in an `OpenTokException`
|
61
|
-
in the event of an error. Check the error message for details.
|
62
|
-
|
63
|
-
Here is a simple that creates a OpenTok server-enabled session:
|
64
|
-
|
65
|
-
sessionId = OTSDK.createSession().to_s
|
66
|
-
|
67
|
-
Here is an example that creates a peer-to-peer session:
|
68
|
-
|
69
|
-
sessionProperties = {OpenTok::SessionPropertyConstants::P2P_PREFERENCE => "enabled"}
|
70
|
-
sessionId = OTSDK.createSession( nil, sessionProperties ).to_s
|
71
|
-
|
72
|
-
You can also create a session using the <a href="http://www.tokbox.com/opentok/api/#session_id_production">OpenTok
|
73
|
-
REST API</a> or the <a href="https://dashboard.tokbox.com/projects">OpenTok dashboard</a>.
|
74
|
-
|
75
|
-
|
76
|
-
generate_token() method
|
77
|
-
-----------------------
|
78
|
-
|
79
|
-
In order to authenticate a user connecting to a OpenTok
|
80
|
-
session, a user must pass an authentication token along with the API key.
|
81
|
-
|
82
|
-
The method has the following parameters:
|
83
|
-
|
84
|
-
* `session_id` (String) — The session ID corresponding to the session to which the user will connect.
|
85
|
-
|
86
|
-
* `role` (String) — Optional. Each role defines a set of permissions granted to the token.
|
87
|
-
Valid values are defined in the RoleConstants class in the server-side SDKs:
|
88
|
-
|
89
|
-
* `SUBSCRIBER` — A subscriber can only subscribe to streams.</li>
|
90
|
-
|
91
|
-
* `PUBLISHER` — A publisher can publish streams, subscribe to streams, and signal.
|
92
|
-
(This is the default value if you do not specify a value for the `role` parameter.)</li>
|
93
|
-
|
94
|
-
* `MODERATOR` — In addition to the privileges granted to a publisher, a moderator
|
95
|
-
can call the `forceUnpublish()` and `forceDisconnect()` method of the
|
96
|
-
Session object.</li>
|
97
|
-
|
98
|
-
* `expire_time` (int) — Optional. The time when the token
|
99
|
-
will expire, defined as an integer value for a Unix timestamp (in seconds).
|
100
|
-
If you do not specify this value, tokens expire in 24 hours after being created.
|
101
|
-
The `expiration_time` value, if specified, must be within 30 days
|
102
|
-
of the creation time.
|
103
|
-
|
104
|
-
* `connection_data` (String) — Optional. A string containing metadata describing the connection.
|
105
|
-
For example, you can pass the user ID, name, or other data describing the connection.
|
106
|
-
The length of the string is limited to 1000 characters.
|
107
|
-
|
108
|
-
Calling the `generate_token()` method returns the token string.
|
109
|
-
|
110
|
-
The following code example shows how to obtain a publisher token:
|
111
|
-
|
112
|
-
token = OTSDK.generateToken :session_id => sessionId
|
113
|
-
|
114
|
-
The following PHP code example shows how to obtain a token that has a role of "moderator" and that has
|
115
|
-
a connection metadata string:
|
116
|
-
|
117
|
-
role = OpenTok::RoleConstants::MODERATOR
|
118
|
-
connection_data = "username=Bob,level=4"
|
119
|
-
token = OTSDK.generateToken :session_id => sessionId, :role => role, :connection_data => connection_data
|
120
|
-
|
121
|
-
For testing, you can also use the <a href="https://dashboard.tokbox.com/projects">OpenTok dashboard</a>
|
122
|
-
page to generate test tokens.
|