opentok 2.4.0.beta.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +2 -1
  4. data/README.md +8 -11
  5. data/lib/opentok.rb +1 -1
  6. data/lib/opentok/archive.rb +2 -3
  7. data/lib/opentok/archives.rb +4 -2
  8. data/lib/opentok/client.rb +37 -12
  9. data/lib/opentok/constants.rb +1 -0
  10. data/lib/opentok/opentok.rb +1 -1
  11. data/lib/opentok/session.rb +1 -1
  12. data/lib/opentok/token_generator.rb +0 -9
  13. data/lib/opentok/version.rb +1 -1
  14. data/opentok.gemspec +3 -2
  15. data/sample/Archiving/public/js/host.js +18 -7
  16. data/sample/Archiving/public/js/participant.js +18 -7
  17. data/sample/Archiving/views/host.erb +1 -1
  18. data/sample/Archiving/views/participant.erb +1 -1
  19. data/sample/HelloWorld/public/js/helloworld.js +26 -6
  20. data/sample/HelloWorld/views/index.erb +1 -1
  21. data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +3 -3
  22. data/spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml +3 -3
  23. data/spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml +3 -3
  24. data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +3 -3
  25. data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +3 -3
  26. data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +3 -3
  27. data/spec/cassettes/OpenTok_Archives/should_find_archives_with_unknown_properties.yml +3 -3
  28. data/spec/cassettes/OpenTok_Archives/should_find_expired_archives.yml +3 -3
  29. data/spec/cassettes/OpenTok_Archives/should_find_paused_archives_by_id.yml +3 -3
  30. data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +3 -3
  31. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +3 -3
  32. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +4 -4
  33. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +4 -4
  34. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +4 -4
  35. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_session_archives.yml +71 -0
  36. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml +2 -2
  37. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +2 -2
  38. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +2 -2
  39. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_for_invalid_media_modes.yml +2 -2
  40. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +2 -2
  41. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +2 -2
  42. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +2 -2
  43. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +2 -2
  44. 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 +2 -2
  45. data/spec/matchers/token.rb +1 -2
  46. data/spec/opentok/archives_spec.rb +16 -0
  47. data/spec/opentok/opentok_spec.rb +5 -0
  48. data/spec/opentok/session_spec.rb +5 -0
  49. data/spec/shared/opentok_generates_tokens.rb +5 -25
  50. data/spec/shared/session_generates_tokens.rb +5 -0
  51. metadata +49 -84
  52. data/doc/OpenTok.html +0 -418
  53. data/doc/OpenTok/Archive.html +0 -1607
  54. data/doc/OpenTok/ArchiveList.html +0 -216
  55. data/doc/OpenTok/Archives.html +0 -1101
  56. data/doc/OpenTok/Client.html +0 -695
  57. data/doc/OpenTok/HashExtensions.html +0 -184
  58. data/doc/OpenTok/OpenTok.html +0 -1083
  59. data/doc/OpenTok/OpenTokArchiveError.html +0 -142
  60. data/doc/OpenTok/OpenTokAuthenticationError.html +0 -143
  61. data/doc/OpenTok/OpenTokError.html +0 -138
  62. data/doc/OpenTok/Session.html +0 -757
  63. data/doc/OpenTok/TokenGenerator.html +0 -204
  64. data/doc/OpenTok/TokenGenerator/ClassMethods.html +0 -187
  65. data/doc/README.md +0 -15
  66. data/doc/_index.html +0 -197
  67. data/doc/class_list.html +0 -58
  68. data/doc/css/common.css +0 -1
  69. data/doc/css/full_list.css +0 -57
  70. data/doc/css/style.css +0 -339
  71. data/doc/file.README.html +0 -87
  72. data/doc/file_list.html +0 -60
  73. data/doc/frames.html +0 -26
  74. data/doc/index.html +0 -87
  75. data/doc/js/app.js +0 -219
  76. data/doc/js/full_list.js +0 -181
  77. data/doc/js/jquery.js +0 -4
  78. data/doc/method_list.html +0 -261
  79. data/doc/top-level-namespace.html +0 -112
@@ -1,142 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Exception: OpenTok::OpenTokArchiveError
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!OpenTok/OpenTokArchiveError.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (O)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
36
- &raquo;
37
- <span class="title">OpenTokArchiveError</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Exception: OpenTok::OpenTokArchiveError
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">StandardError</li>
82
-
83
- <li class="next"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></li>
84
-
85
- <li class="next">OpenTok::OpenTokArchiveError</li>
86
-
87
- </ul>
88
- <a href="#" class="inheritanceTree">show all</a>
89
-
90
- </dd>
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r2 last">Defined in:</dt>
101
- <dd class="r2 last">lib/opentok/exceptions.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>Defines errors raised by archive-related methods of the OpenTok Ruby SDK.</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div>
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
- </div>
134
-
135
- <div id="footer">
136
- Generated on Mon May 25 15:52:46 2015 by
137
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
138
- 0.8.7.6 (ruby-1.9.3).
139
- </div>
140
-
141
- </body>
142
- </html>
@@ -1,143 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Exception: OpenTok::OpenTokAuthenticationError
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!OpenTok/OpenTokAuthenticationError.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (O)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
36
- &raquo;
37
- <span class="title">OpenTokAuthenticationError</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Exception: OpenTok::OpenTokAuthenticationError
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">StandardError</li>
82
-
83
- <li class="next"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></li>
84
-
85
- <li class="next">OpenTok::OpenTokAuthenticationError</li>
86
-
87
- </ul>
88
- <a href="#" class="inheritanceTree">show all</a>
89
-
90
- </dd>
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r2 last">Defined in:</dt>
101
- <dd class="r2 last">lib/opentok/exceptions.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>Defines errors raised when you attempt an operation using an invalid
110
- OpenTok API key or secret.</p>
111
-
112
-
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div>
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
- </div>
135
-
136
- <div id="footer">
137
- Generated on Mon May 25 15:52:46 2015 by
138
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
139
- 0.8.7.6 (ruby-1.9.3).
140
- </div>
141
-
142
- </body>
143
- </html>
@@ -1,138 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Exception: OpenTok::OpenTokError
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!OpenTok/OpenTokError.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (O)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
36
- &raquo;
37
- <span class="title">OpenTokError</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Exception: OpenTok::OpenTokError
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">StandardError</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">StandardError</li>
82
-
83
- <li class="next">OpenTok::OpenTokError</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
- <dt class="r2 last">Defined in:</dt>
99
- <dd class="r2 last">lib/opentok/exceptions.rb</dd>
100
-
101
- </dl>
102
- <div class="clear"></div>
103
-
104
- <h2>Overview</h2><div class="docstring">
105
- <div class="discussion">
106
-
107
- <p>Defines errors raised by methods of the OpenTok Ruby SDK.</p>
108
-
109
-
110
- </div>
111
- </div>
112
- <div class="tags">
113
-
114
-
115
- </div><div id="subclasses">
116
- <h2>Direct Known Subclasses</h2>
117
- <p class="children"><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span>, <span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></p>
118
- </div>
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- </div>
130
-
131
- <div id="footer">
132
- Generated on Mon May 25 15:52:46 2015 by
133
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
- 0.8.7.6 (ruby-1.9.3).
135
- </div>
136
-
137
- </body>
138
- </html>
@@ -1,757 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: OpenTok::Session
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!OpenTok/Session.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (S)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
36
- &raquo;
37
- <span class="title">Session</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: OpenTok::Session
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">OpenTok::Session</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/opentok/session.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Represents an OpenTok session.</p>
106
-
107
- <p>Use the OpenTok.createSession() method to create an OpenTok session. Use
108
- the session_id property of the Session object to get the session ID.</p>
109
-
110
-
111
- </div>
112
- </div>
113
- <div class="tags">
114
-
115
-
116
- </div>
117
- <h2>Constant Summary</h2>
118
-
119
-
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
124
- <ul class="summary">
125
-
126
- <li class="public ">
127
- <span class="summary_signature">
128
-
129
- <a href="#archive_mode-instance_method" title="#archive_mode (instance method)">- (String) <strong>archive_mode</strong> </a>
130
-
131
-
132
-
133
- </span>
134
-
135
-
136
-
137
-
138
- <span class="note title readonly">readonly</span>
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <span class="summary_desc"><div class='inline'>
149
- <p>Whether the session will be archived automatically (:always) or not
150
- (:manual).</p>
151
- </div></span>
152
-
153
- </li>
154
-
155
-
156
- <li class="public ">
157
- <span class="summary_signature">
158
-
159
- <a href="#location-instance_method" title="#location (instance method)">- (String) <strong>location</strong> </a>
160
-
161
-
162
-
163
- </span>
164
-
165
-
166
-
167
-
168
- <span class="note title readonly">readonly</span>
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
- <span class="summary_desc"><div class='inline'>
179
- <p>The location hint IP address.</p>
180
- </div></span>
181
-
182
- </li>
183
-
184
-
185
- <li class="public ">
186
- <span class="summary_signature">
187
-
188
- <a href="#media_mode-instance_method" title="#media_mode (instance method)">- (String) <strong>media_mode</strong> </a>
189
-
190
-
191
-
192
- </span>
193
-
194
-
195
-
196
-
197
- <span class="note title readonly">readonly</span>
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
- <span class="summary_desc"><div class='inline'>
208
- <p>Set to :routed if the session uses the OpenTok Media Router or to :relayed
209
- if the session attempts to transmit streams directly between clients.</p>
210
- </div></span>
211
-
212
- </li>
213
-
214
-
215
- <li class="public ">
216
- <span class="summary_signature">
217
-
218
- <a href="#session_id-instance_method" title="#session_id (instance method)">- (String) <strong>session_id</strong> </a>
219
-
220
-
221
-
222
- </span>
223
-
224
-
225
-
226
-
227
- <span class="note title readonly">readonly</span>
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- <span class="summary_desc"><div class='inline'>
238
- <p>The session ID.</p>
239
- </div></span>
240
-
241
- </li>
242
-
243
-
244
- </ul>
245
-
246
-
247
-
248
-
249
-
250
- <h2>
251
- Instance Method Summary
252
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
253
- </h2>
254
-
255
- <ul class="summary">
256
-
257
- <li class="public ">
258
- <span class="summary_signature">
259
-
260
- <a href="#generate_token-instance_method" title="#generate_token (instance method)">- (String) <strong>generate_token</strong>(options) </a>
261
-
262
-
263
-
264
- </span>
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
- <span class="summary_desc"><div class='inline'>
275
- <p>Generates a token.</p>
276
- </div></span>
277
-
278
- </li>
279
-
280
-
281
- </ul>
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
- <div id="instance_attr_details" class="attr_details">
292
- <h2>Instance Attribute Details</h2>
293
-
294
-
295
- <span id=""></span>
296
- <div class="method_details first">
297
- <h3 class="signature first" id="archive_mode-instance_method">
298
-
299
- - (<tt>String</tt>) <strong>archive_mode</strong> <span class="extras">(readonly)</span>
300
-
301
-
302
-
303
-
304
-
305
- </h3><div class="docstring">
306
- <div class="discussion">
307
-
308
- <p>Whether the session will be archived automatically (<tt>:always</tt>) or
309
- not (<tt>:manual</tt>).</p>
310
-
311
-
312
- </div>
313
- </div>
314
- <div class="tags">
315
-
316
- <p class="tag_title">Returns:</p>
317
- <ul class="return">
318
-
319
- <li>
320
-
321
-
322
- <span class='type'>(<tt>String</tt>)</span>
323
-
324
-
325
-
326
- &mdash;
327
- <div class='inline'>
328
- <p>the current value of archive_mode</p>
329
- </div>
330
-
331
- </li>
332
-
333
- </ul>
334
-
335
- </div><table class="source_code">
336
- <tr>
337
- <td>
338
- <pre class="lines">
339
-
340
-
341
- 46
342
- 47
343
- 48</pre>
344
- </td>
345
- <td>
346
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
347
-
348
- <span class='kw'>def</span> <span class='id identifier rubyid_archive_mode'>archive_mode</span>
349
- <span class='ivar'>@archive_mode</span>
350
- <span class='kw'>end</span></pre>
351
- </td>
352
- </tr>
353
- </table>
354
- </div>
355
-
356
-
357
- <span id=""></span>
358
- <div class="method_details ">
359
- <h3 class="signature " id="location-instance_method">
360
-
361
- - (<tt>String</tt>) <strong>location</strong> <span class="extras">(readonly)</span>
362
-
363
-
364
-
365
-
366
-
367
- </h3><div class="docstring">
368
- <div class="discussion">
369
-
370
- <p>The location hint IP address. See the OpenTok.createSession() method.</p>
371
-
372
-
373
- </div>
374
- </div>
375
- <div class="tags">
376
-
377
- <p class="tag_title">Returns:</p>
378
- <ul class="return">
379
-
380
- <li>
381
-
382
-
383
- <span class='type'>(<tt>String</tt>)</span>
384
-
385
-
386
-
387
- &mdash;
388
- <div class='inline'>
389
- <p>the current value of location</p>
390
- </div>
391
-
392
- </li>
393
-
394
- </ul>
395
-
396
- </div><table class="source_code">
397
- <tr>
398
- <td>
399
- <pre class="lines">
400
-
401
-
402
- 46
403
- 47
404
- 48</pre>
405
- </td>
406
- <td>
407
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
408
-
409
- <span class='kw'>def</span> <span class='id identifier rubyid_location'>location</span>
410
- <span class='ivar'>@location</span>
411
- <span class='kw'>end</span></pre>
412
- </td>
413
- </tr>
414
- </table>
415
- </div>
416
-
417
-
418
- <span id=""></span>
419
- <div class="method_details ">
420
- <h3 class="signature " id="media_mode-instance_method">
421
-
422
- - (<tt>String</tt>) <strong>media_mode</strong> <span class="extras">(readonly)</span>
423
-
424
-
425
-
426
-
427
-
428
- </h3><div class="docstring">
429
- <div class="discussion">
430
-
431
- <p>Set to :routed if the session uses the OpenTok Media Router or to :relayed
432
- if the session attempts to transmit streams directly between clients.</p>
433
-
434
-
435
- </div>
436
- </div>
437
- <div class="tags">
438
-
439
- <p class="tag_title">Returns:</p>
440
- <ul class="return">
441
-
442
- <li>
443
-
444
-
445
- <span class='type'>(<tt>String</tt>)</span>
446
-
447
-
448
-
449
- &mdash;
450
- <div class='inline'>
451
- <p>the current value of media_mode</p>
452
- </div>
453
-
454
- </li>
455
-
456
- </ul>
457
-
458
- </div><table class="source_code">
459
- <tr>
460
- <td>
461
- <pre class="lines">
462
-
463
-
464
- 46
465
- 47
466
- 48</pre>
467
- </td>
468
- <td>
469
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
470
-
471
- <span class='kw'>def</span> <span class='id identifier rubyid_media_mode'>media_mode</span>
472
- <span class='ivar'>@media_mode</span>
473
- <span class='kw'>end</span></pre>
474
- </td>
475
- </tr>
476
- </table>
477
- </div>
478
-
479
-
480
- <span id=""></span>
481
- <div class="method_details ">
482
- <h3 class="signature " id="session_id-instance_method">
483
-
484
- - (<tt>String</tt>) <strong>session_id</strong> <span class="extras">(readonly)</span>
485
-
486
-
487
-
488
-
489
-
490
- </h3><div class="docstring">
491
- <div class="discussion">
492
-
493
- <p>The session ID.</p>
494
-
495
-
496
- </div>
497
- </div>
498
- <div class="tags">
499
-
500
- <p class="tag_title">Returns:</p>
501
- <ul class="return">
502
-
503
- <li>
504
-
505
-
506
- <span class='type'>(<tt>String</tt>)</span>
507
-
508
-
509
-
510
- &mdash;
511
- <div class='inline'>
512
- <p>the current value of session_id</p>
513
- </div>
514
-
515
- </li>
516
-
517
- </ul>
518
-
519
- </div><table class="source_code">
520
- <tr>
521
- <td>
522
- <pre class="lines">
523
-
524
-
525
- 46
526
- 47
527
- 48</pre>
528
- </td>
529
- <td>
530
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
531
-
532
- <span class='kw'>def</span> <span class='id identifier rubyid_session_id'>session_id</span>
533
- <span class='ivar'>@session_id</span>
534
- <span class='kw'>end</span></pre>
535
- </td>
536
- </tr>
537
- </table>
538
- </div>
539
-
540
- </div>
541
-
542
-
543
- <div id="instance_method_details" class="method_details_list">
544
- <h2>Instance Method Details</h2>
545
-
546
-
547
- <div class="method_details first">
548
- <h3 class="signature first" id="generate_token-instance_method">
549
-
550
- - (<tt>String</tt>) <strong>generate_token</strong>(options)
551
-
552
-
553
-
554
-
555
-
556
- </h3><div class="docstring">
557
- <div class="discussion">
558
-
559
- <p>Generates a token.</p>
560
-
561
-
562
- </div>
563
- </div>
564
- <div class="tags">
565
- <p class="tag_title">Parameters:</p>
566
- <ul class="param">
567
-
568
- <li>
569
-
570
- <span class='name'>options</span>
571
-
572
-
573
- <span class='type'>(<tt>Hash</tt>)</span>
574
-
575
-
576
-
577
- </li>
578
-
579
- </ul>
580
-
581
-
582
-
583
-
584
- <p class="tag_title">Options Hash (<tt>options</tt>):</p>
585
- <ul class="option">
586
-
587
- <li>
588
- <span class="name">:role</span>
589
- <span class="type">(<tt>Symbol</tt>)</span>
590
- <span class="default">
591
-
592
- </span>
593
-
594
- &mdash; <div class='inline'>
595
- <p>The role for the token. Set this to one of the following values:</p>
596
- <ul><li>
597
- <p><tt>:subscriber</tt> -- A subscriber can only subscribe to streams.</p>
598
- </li><li>
599
- <p><tt>:publisher</tt> -- A publisher can publish streams, subscribe to
600
- streams, and signal. (This is the default value if you do not specify a
601
- role.)</p>
602
- </li><li>
603
- <p><tt>:moderator</tt> -- In addition to the privileges granted to a
604
- publisher, in clients using the OpenTok.js 2.2 library, a moderator can
605
- call the <tt>forceUnpublish()</tt> and <tt>forceDisconnect()</tt> method of
606
- the Session object.</p>
607
- </li></ul>
608
- </div>
609
-
610
- </li>
611
-
612
- <li>
613
- <span class="name">:expire_time</span>
614
- <span class="type">(<tt>integer</tt>)</span>
615
- <span class="default">
616
-
617
- </span>
618
-
619
- &mdash; <div class='inline'>
620
- <p>The expiration time, in seconds since the UNIX epoch. Pass in 0 to use the
621
- default expiration time of 24 hours after the token creation time. The
622
- maximum expiration time is 30 days after the creation time.</p>
623
- </div>
624
-
625
- </li>
626
-
627
- <li>
628
- <span class="name">:data</span>
629
- <span class="type">(<tt>String</tt>)</span>
630
- <span class="default">
631
-
632
- </span>
633
-
634
- &mdash; <div class='inline'>
635
- <p>A string containing connection metadata describing the end-user. For
636
- example, you can pass the user ID, name, or other data describing the
637
- end-user. The length of the string is limited to 1000 characters. This data
638
- cannot be updated once it is set.</p>
639
- </div>
640
-
641
- </li>
642
-
643
- </ul>
644
-
645
-
646
- <p class="tag_title">Returns:</p>
647
- <ul class="return">
648
-
649
- <li>
650
-
651
-
652
- <span class='type'>(<tt>String</tt>)</span>
653
-
654
-
655
-
656
- &mdash;
657
- <div class='inline'>
658
- <p>The token string.</p>
659
- </div>
660
-
661
- </li>
662
-
663
- </ul>
664
-
665
- </div><table class="source_code">
666
- <tr>
667
- <td>
668
- <pre class="lines">
669
-
670
-
671
- 46
672
- 47
673
- 48
674
- 49
675
- 50
676
- 51
677
- 52
678
- 53
679
- 54
680
- 55
681
- 56
682
- 57
683
- 58
684
- 59
685
- 60
686
- 61
687
- 62
688
- 63
689
- 64
690
- 65
691
- 66
692
- 67
693
- 68
694
- 69
695
- 70
696
- 71
697
- 72
698
- 73
699
- 74
700
- 75
701
- 76
702
- 77
703
- 78</pre>
704
- </td>
705
- <td>
706
- <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 46</span>
707
-
708
- <span class='kw'>class</span> <span class='const'>Session</span>
709
-
710
- <span class='id identifier rubyid_include'>include</span> <span class='const'>TokenGenerator</span>
711
- <span class='id identifier rubyid_generates_tokens'>generates_tokens</span><span class='lparen'>(</span><span class='lbrace'>{</span>
712
- <span class='symbol'>:api_key</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_api_key'>api_key</span> <span class='rbrace'>}</span><span class='comma'>,</span>
713
- <span class='symbol'>:api_secret</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_api_secret'>api_secret</span> <span class='rbrace'>}</span><span class='comma'>,</span>
714
- <span class='symbol'>:session_id</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_session_id'>session_id</span> <span class='rbrace'>}</span>
715
- <span class='rbrace'>}</span><span class='rparen'>)</span>
716
-
717
- <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:session_id</span><span class='comma'>,</span> <span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:location</span><span class='comma'>,</span> <span class='symbol'>:archive_mode</span><span class='comma'>,</span> <span class='symbol'>:api_key</span><span class='comma'>,</span> <span class='symbol'>:api_secret</span>
718
-
719
- <span class='comment'># @private
720
- </span> <span class='comment'># this implementation doesn't completely understand the format of a Session ID
721
- </span> <span class='comment'># that is intentional, that is too much responsibility.
722
- </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_belongs_to_api_key?'>belongs_to_api_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span>
723
- <span class='id identifier rubyid_encoded'>encoded</span> <span class='op'>=</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='lbracket'>[</span><span class='int'>2</span><span class='op'>..</span><span class='id identifier rubyid_session_id'>session_id</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rbracket'>]</span><span class='period'>
724
- </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>+</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>
725
- </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
726
- <span class='id identifier rubyid_decoded'>decoded</span> <span class='op'>=</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_decode64'>decode64</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded'>encoded</span><span class='rparen'>)</span>
727
- <span class='id identifier rubyid_decoded'>decoded</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_api_key'>api_key</span>
728
- <span class='kw'>end</span>
729
-
730
- <span class='comment'># @private
731
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
732
- <span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='ivar'>@api_secret</span><span class='comma'>,</span> <span class='ivar'>@session_id</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span>
733
- <span class='ivar'>@media_mode</span><span class='comma'>,</span> <span class='ivar'>@location</span><span class='comma'>,</span> <span class='ivar'>@archive_mode</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:relayed</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:location</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:archive_mode</span><span class='comma'>,</span> <span class='symbol'>:manual</span><span class='rparen'>)</span>
734
- <span class='kw'>end</span>
735
-
736
- <span class='comment'># @private
737
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
738
- <span class='ivar'>@session_id</span>
739
- <span class='kw'>end</span>
740
- <span class='kw'>end</span></pre>
741
- </td>
742
- </tr>
743
- </table>
744
- </div>
745
-
746
- </div>
747
-
748
- </div>
749
-
750
- <div id="footer">
751
- Generated on Mon May 25 15:52:46 2015 by
752
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
753
- 0.8.7.6 (ruby-1.9.3).
754
- </div>
755
-
756
- </body>
757
- </html>