scriptcam-rails 0.0.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6f227ffedef130a0b84f642b306d7a1cd4462999
4
+ data.tar.gz: 6716b7df316cff8c439ad779a011987a88b2979e
5
+ SHA512:
6
+ metadata.gz: 6f41220590ffe4000133da94a6ce7c1960d7e3cb28a147d300f3f608a058c2fd9443cee7f7198b17ec3303a22bc1be170acce28ffc3fd872fc0cc157585057b2
7
+ data.tar.gz: 61d4f4489c748c37591b18ac374852947936b2a785258d04baadd139a5bb9730eecdde46e99b20c5ccb020557072f4fa6b1d4b08be11c4f79ddd8777eb89962d
data/README.md CHANGED
@@ -6,11 +6,10 @@ By the way, it's free for non-commercial use!
6
6
 
7
7
  ## Usage
8
8
 
9
- This gem vendors ScriptCam 1.2.2 for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.
9
+ This gem vendors ScriptCam 1.6.0 for Rails 4 and greater. The files will be added to the asset pipeline and available for you to use.
10
10
 
11
11
  To enable, add the following line to the file app/assets/javascripts/application.js (or other sprockets manifest):
12
12
 
13
- //= require swfobject
14
13
  //= require scriptcam
15
14
 
16
15
  ## Installation
@@ -1,174 +1,259 @@
1
- // _____ _ _ _____
2
- // / ___| (_) | | / __ \
3
- // \ `--. ___ _ __ _ _ __ | |_| / \/ __ _ _ __ ___
4
- // `--. \/ __| '__| | '_ \| __| | / _` | '_ ` _ \
5
- // /\__/ / (__| | | | |_) | |_| \__/\ (_| | | | | | |
6
- // \____/ \___|_| |_| .__/ \__|\____/\__,_|_| |_| |_|
7
- // | |
8
- // Version 1.1.7 |_| (c) Tele-Line Videotex Services
9
-
10
- // Use jscompress.com to compress this file
11
-
12
- ;(function($) {
13
- $.fn.scriptcam=function(options) {
14
- // merge passed options with default values
15
- var opts=$.extend({}, $.fn.scriptcam.defaults, options);
16
- // off we go
17
- return this.each(function() {
18
- // add flash to div
19
- opts.id=this.id; // add id of plugin to the options structure
20
- data=opts; // pass options to jquery internal data field to make them available to the outside world
21
- $('#'+opts.id).html(opts.noFlashFound); // inject no flash found message
22
- // forward incoming flash movie calls to outgoing functions
23
- $.scriptcam.SC_promptWillShow=data.promptWillShow;
24
- $.scriptcam.SC_onMotion=data.onMotion;
25
- $.scriptcam.SC_onError=data.onError;
26
- $.scriptcam.SC_onWebcamReady=data.onWebcamReady;
27
- $.scriptcam.SC_connected=data.connected;
28
- $.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;
29
- $.scriptcam.SC_disconnected=data.disconnected;
30
- $.scriptcam.SC_setVolume=data.setVolume;
31
- $.scriptcam.SC_timeLeft=data.timeLeft;
32
- $.scriptcam.SC_addChatText=function(value) {
33
- value = value.replace(":{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
34
- value = value.replace(":-{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
35
- value = value.replace(":)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
36
- value = value.replace(":-)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
37
- value = value.replace(":D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
38
- value = value.replace(":-D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
39
- value = value.replace(":O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
40
- value = value.replace(":-O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
41
- value = value.replace(":(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
42
- value = value.replace(":-(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
43
- value = value.replace(":p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
44
- value = value.replace(":-p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
45
- value = value.replace(";)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
46
- value = value.replace(";-)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
47
- $('#'+data.chatWindow).append(value+'<br/>');
48
- $('#'+data.chatWindow).animate({ scrollTop: $('#'+data.chatWindow).prop("scrollHeight") - $('#'+data.chatWindow).height() }, 100);
49
- }
50
- var newWidth=opts.width;
51
- if (opts.chatRoom) {
52
- newWidth=(newWidth*2)+5; // make room for two video windows with a margin of 5 when chatting
53
- }
54
- if (opts.chatRoom || opts.fileName || opts.daeFilename) {
55
- // use GPU acceleration when recording, chatting or AR
56
- var params = {
57
- menu: 'false',
58
- wmode: 'direct'
59
- };
60
- }
61
- else {
62
- // enable HTML overlay when in snapshot mode
63
- var params = {
64
- menu: 'false',
65
- wmode: 'transparent'
66
- };
67
- }
68
- // Escape all values contained in the flashVars (IE needs this)
69
- for (var key in opts) {
70
- opts[key] = encodeURIComponent(opts[key]);
71
- };
72
- swfobject.embedSWF('/assets/scriptcam.swf', opts.id, newWidth, opts.height, '11.4', false, opts, params);
73
- });
74
- };
75
-
76
- $.scriptcam={};
77
-
78
- // outgoing functions (calling the flash movie)
79
-
80
- $.scriptcam.getFrameAsBase64=function() {
81
- return $('#'+data.id).get(0).SC_getFrameAsBase64();
82
- }
83
-
84
- $.scriptcam.version=function() {
85
- return $('#'+data.id).get(0).SC_version();
86
- }
87
-
88
- $.scriptcam.getMotionParameters=function() {
89
- $('#'+data.id).get(0).SC_getMotionParameters();
90
- }
91
-
92
- $.scriptcam.getBarCode=function() {
93
- return $('#'+data.id).get(0).SC_getBarCode();
94
- }
95
-
96
- $.scriptcam.startRecording=function() {
97
- $('#'+data.id).get(0).SC_startRecording();
98
- }
99
-
100
- $.scriptcam.closeCamera=function() {
101
- $('#'+data.id).get(0).SC_closeCamera();
102
- }
103
-
104
- $.scriptcam.changeVolume=function(value) {
105
- $('#'+data.id).get(0).SC_changeVolume(value);
106
- }
107
-
108
- $.scriptcam.sendMessage=function(value) {
109
- $('#'+data.id).get(0).SC_sendMessage(value);
110
- }
111
-
112
- $.scriptcam.changeCamera=function(value) {
113
- $('#'+data.id).get(0).SC_changeCamera(value);
114
- }
115
-
116
- $.scriptcam.changeMicrophone=function(value) {
117
- $('#'+data.id).get(0).SC_changeMicrophone(value);
118
- }
119
-
120
- // set javascript default values (flash default values are managed in the swf file)
121
- $.fn.scriptcam.defaults={
122
- width:320,
123
- height:240,
124
- chatWindow:'chatWindow',
125
- path:'',
126
- noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software. Please click on the link to download the installer.</p>'
127
- };
128
- })(jQuery);
129
-
130
- // incoming functions (calls coming from flash) - must be public and forward calls to the scriptcam plugin
131
-
132
- function SC_onError(errorId,errorMsg) {
133
- $.scriptcam.SC_onError(errorId,errorMsg);
134
- }
135
-
136
- function SC_onMotion(decodedString) {
137
- $.scriptcam.SC_onMotion(decodedString);
138
- }
139
-
140
- function SC_promptWillShow() {
141
- $.scriptcam.SC_promptWillShow();
142
- }
143
-
144
- function SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone) {
145
- $.scriptcam.SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone);
146
- }
147
-
148
- function SC_onPictureAsBase64(value) {
149
- $.scriptcam.SC_onPictureAsBase64(value);
150
- }
151
-
152
- function SC_connected() {
153
- $.scriptcam.SC_connected();
154
- }
155
-
156
- function SC_disconnected() {
157
- $.scriptcam.SC_disconnected();
158
- }
159
-
160
- function SC_setVolume(value) {
161
- $.scriptcam.SC_setVolume(value);
162
- }
163
-
164
- function SC_onMotion(motion,brightness,color,facearea) {
165
- $.scriptcam.SC_onMotion(motion,brightness,color,facearea);
166
- }
167
-
168
- function SC_timeLeft(value) {
169
- $.scriptcam.SC_timeLeft(value);
170
- }
171
-
172
- function SC_addChatText(value) {
173
- $.scriptcam.SC_addChatText(value);
174
- }
1
+ //= require swfobject
2
+
3
+ // _____ _ _ _____
4
+ // / ___| (_) | | / __ \
5
+ // \ `--. ___ _ __ _ _ __ | |_| / \/
6
+ // `--. \/ __| '__| | '_ \| __| | / _` | '_ ` _ \
7
+ // /\__/ / (__| | | | |_) | |_| \__/\ (_| | | | | | |
8
+ // \____/ \___|_| |_| .__/ \__|\____/\__,_|_| |_| |_|
9
+ // | |
10
+ // Version 1.6.0 |_| (c) Tele-Line Videotex Services
11
+
12
+ // Use jscompress.com to compress this file
13
+
14
+ ;(function($) {
15
+ $.fn.scriptcam=function(options) {
16
+ // merge passed options with default values
17
+ var opts=$.extend({}, $.fn.scriptcam.defaults, options);
18
+ // off we go
19
+ return this.each(function() {
20
+ // add flash to div
21
+ opts.id=this.id; // add id of plugin to the options structure
22
+ data=opts; // pass options to jquery internal data field to make them available to the outside world
23
+ data.path=decodeURIComponent(data.path); // convert URI back to normal string
24
+ $('#'+opts.id).html(opts.noFlashFound); // inject no flash found message
25
+ // forward incoming flash movie calls to outgoing functions
26
+ $.scriptcam.SC_promptWillShow=data.promptWillShow;
27
+ $.scriptcam.SC_fileReady=data.fileReady;
28
+ $.scriptcam.SC_fileConversionStarted=data.fileConversionStarted;
29
+ $.scriptcam.SC_onMotion=data.onMotion;
30
+ $.scriptcam.SC_onError=data.onError;
31
+ $.scriptcam.SC_onHandLeft=data.onHandLeft;
32
+ $.scriptcam.SC_onHandRight=data.onHandRight;
33
+ $.scriptcam.SC_onWebcamReady=data.onWebcamReady;
34
+ $.scriptcam.SC_connected=data.connected;
35
+ $.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;
36
+ $.scriptcam.SC_disconnected=data.disconnected;
37
+ $.scriptcam.SC_setVolume=data.setVolume;
38
+ $.scriptcam.SC_timeLeft=data.timeLeft;
39
+ $.scriptcam.SC_userLeft=data.userLeft;
40
+ $.scriptcam.SC_userJoined=data.userJoined;
41
+ $.scriptcam.SC_addChatText=function(value) {
42
+ value = value.replace(":{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
43
+ value = value.replace(":-{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
44
+ value = value.replace(":)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
45
+ value = value.replace(":-)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
46
+ value = value.replace(":D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
47
+ value = value.replace(":-D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
48
+ value = value.replace(":O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
49
+ value = value.replace(":-O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
50
+ value = value.replace(":(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
51
+ value = value.replace(":-(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
52
+ value = value.replace(":p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
53
+ value = value.replace(":-p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
54
+ value = value.replace(";)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
55
+ value = value.replace(";-)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
56
+ $('#'+data.chatWindow).append(value+'<br/>');
57
+ $('#'+data.chatWindow).animate({ scrollTop: $('#'+data.chatWindow).prop("scrollHeight") - $('#'+data.chatWindow).height() }, 100);
58
+ }
59
+ if (opts.canvasHeight && opts.canvasHeight) {
60
+ var newWidth=opts.canvasWidth;
61
+ var newHeight=opts.canvasHeight;
62
+ }
63
+ else {
64
+ // no canvas dimensions given, make our own horizontal layout
65
+ var newWidth=opts.width*opts.zoom;
66
+ var newHeight=opts.height*opts.zoom;
67
+ if (opts.chatRoom) {
68
+ newWidth=(opts.width*opts.zoom)+(opts.width*opts.zoomChat)+5; // make room for two horizontal video windows with a margin of 5
69
+ opts.posX=(opts.width*opts.zoom)+5;
70
+ newHeight=opts.height*Math.max(opts.zoom,opts.zoomChat);
71
+ };
72
+ }
73
+ // make new dimensions are not below minimum flash size
74
+ if (newWidth < 215) {
75
+ newWidth=215;
76
+ }
77
+ if (newHeight < 138) {
78
+ newHeight=138;
79
+ }
80
+ if (opts.rotate!=0 || opts.skewX!=0 || opts.skewY!=0 || opts.flip!=0 || opts.zoom!=1 || opts.zoomChat!=1) {
81
+ // no GPU acceleration
82
+ var params = {
83
+ menu: 'false',
84
+ wmode: 'window',
85
+ allowScriptAccess: 'always',
86
+ allowFullScreen: 'true'
87
+ };
88
+ }
89
+ else {
90
+ // GPU acceleration when no filter is used
91
+ var params = {
92
+ menu: 'false',
93
+ wmode: 'direct',
94
+ allowScriptAccess: 'always',
95
+ allowFullScreen: 'true'
96
+ };
97
+ };
98
+ // Escape all values contained in the flashVars (IE needs this)
99
+ for (var key in opts) {
100
+ opts[key] = encodeURIComponent(opts[key]);
101
+ };
102
+ if (fileExists('<%= asset_path 'scriptcam.swf' %>')) {
103
+ swfobject.embedSWF('<%= asset_path 'scriptcam.swf' %>', opts.id, newWidth, newHeight, '11.6', false, opts, params);
104
+ }
105
+ else {
106
+ alert('<%= asset_path 'scriptcam.swf' %> not found, please check the path parameter');
107
+ }
108
+ });
109
+ };
110
+
111
+ function fileExists(url) {
112
+ var http = new XMLHttpRequest();
113
+ http.open('HEAD', url, false);
114
+ http.send();
115
+ return http.status==200;
116
+ }
117
+
118
+ $.scriptcam={};
119
+
120
+ // outgoing functions (calling the flash movie)
121
+
122
+ $.scriptcam.getFrameAsBase64=function() {
123
+ return $('#'+data.id).get(0).SC_getFrameAsBase64();
124
+ }
125
+
126
+ $.scriptcam.version=function() {
127
+ return $('#'+data.id).get(0).SC_version();
128
+ }
129
+
130
+ $.scriptcam.hardwareacceleration=function() {
131
+ return $('#'+data.id).get(0).SC_hardwareacceleration();
132
+ }
133
+
134
+ $.scriptcam.getMotionParameters=function() {
135
+ $('#'+data.id).get(0).SC_getMotionParameters();
136
+ }
137
+
138
+ $.scriptcam.getBarCode=function() {
139
+ return $('#'+data.id).get(0).SC_getBarCode();
140
+ }
141
+
142
+ $.scriptcam.startRecording=function() {
143
+ $('#'+data.id).get(0).SC_startRecording();
144
+ }
145
+
146
+ $.scriptcam.pauseRecording=function() {
147
+ $('#'+data.id).get(0).SC_pauseRecording();
148
+ }
149
+
150
+ $.scriptcam.resumeRecording=function() {
151
+ $('#'+data.id).get(0).SC_resumeRecording();
152
+ }
153
+
154
+ $.scriptcam.closeCamera=function() {
155
+ $('#'+data.id).get(0).SC_closeCamera();
156
+ }
157
+
158
+ $.scriptcam.changeVolume=function(value) {
159
+ $('#'+data.id).get(0).SC_changeVolume(value);
160
+ }
161
+
162
+ $.scriptcam.sendMessage=function(value) {
163
+ $('#'+data.id).get(0).SC_sendMessage(value);
164
+ }
165
+
166
+ $.scriptcam.playMP3=function(value) {
167
+ $('#'+data.id).get(0).SC_playMP3(value);
168
+ }
169
+
170
+ $.scriptcam.changeCamera=function(value) {
171
+ $('#'+data.id).get(0).SC_changeCamera(value);
172
+ }
173
+
174
+ $.scriptcam.changeMicrophone=function(value) {
175
+ $('#'+data.id).get(0).SC_changeMicrophone(value);
176
+ }
177
+
178
+ // set javascript default values (flash default values are managed in the swf file)
179
+ $.fn.scriptcam.defaults={
180
+ width:320,
181
+ height:240,
182
+ chatWindow:'chatWindow',
183
+ path:'',
184
+ zoom:1,
185
+ zoomChat:1,
186
+ rotate:0,
187
+ skewX:0,
188
+ skewY:0,
189
+ flip:0,
190
+ noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.7</a> to use this software.<br/>Please click on the link to download the installer.</p>'
191
+ };
192
+ })(jQuery);
193
+
194
+ // incoming functions (calls coming from flash) - must be public and forward calls to the scriptcam plugin
195
+
196
+ function SC_onError(errorId,errorMsg) {
197
+ $.scriptcam.SC_onError(errorId,errorMsg);
198
+ }
199
+
200
+ function SC_fileReady(fileName) {
201
+ $.scriptcam.SC_fileReady(fileName);
202
+ }
203
+
204
+ function SC_fileConversionStarted(fileName) {
205
+ $.scriptcam.SC_fileConversionStarted(fileName);
206
+ }
207
+
208
+ function SC_onMotion(decodedString) {
209
+ $.scriptcam.SC_onMotion(decodedString);
210
+ }
211
+
212
+ function SC_promptWillShow() {
213
+ $.scriptcam.SC_promptWillShow();
214
+ }
215
+ function SC_onHandLeft() {
216
+ $.scriptcam.SC_onHandLeft();
217
+ }
218
+ function SC_onHandRight() {
219
+ $.scriptcam.SC_onHandRight();
220
+ }
221
+ function SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone) {
222
+ $.scriptcam.SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone);
223
+ }
224
+
225
+ function SC_onPictureAsBase64(value) {
226
+ $.scriptcam.SC_onPictureAsBase64(value);
227
+ }
228
+
229
+ function SC_connected() {
230
+ $.scriptcam.SC_connected();
231
+ }
232
+
233
+ function SC_disconnected() {
234
+ $.scriptcam.SC_disconnected();
235
+ }
236
+
237
+ function SC_setVolume(value) {
238
+ $.scriptcam.SC_setVolume(value);
239
+ }
240
+
241
+ function SC_onMotion(motion,brightness,color,motionx,motiony) {
242
+ $.scriptcam.SC_onMotion(motion,brightness,color,motionx,motiony);
243
+ }
244
+
245
+ function SC_timeLeft(value) {
246
+ $.scriptcam.SC_timeLeft(value);
247
+ }
248
+
249
+ function SC_addChatText(value) {
250
+ $.scriptcam.SC_addChatText(value);
251
+ }
252
+
253
+ function SC_userJoined(value) {
254
+ $.scriptcam.SC_userJoined(value);
255
+ }
256
+
257
+ function SC_userLeft(value) {
258
+ $.scriptcam.SC_userLeft(value);
259
+ }
@@ -1,4 +1,3 @@
1
- # Configure Rails 3.1 to have assets in the load path
2
1
  module ScriptCam
3
2
  module Rails
4
3
  class Engine < ::Rails::Engine
@@ -1,5 +1,5 @@
1
1
  module Scriptcam
2
2
  module Rails
3
- VERSION = "0.0.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,108 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scriptcam-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eduardo Maia
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>'
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: 3.1.0
19
+ version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>'
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 3.1.0
26
+ version: '3.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: 1.1.rc
33
+ version: '1.1'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: 1.1.rc
40
+ version: '1.1'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: 0.9.2
47
+ version: '0.9'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: 0.9.2
62
- description: ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
54
+ version: '0.9'
55
+ description: ScriptCam, tastefully bundled for the Rails 4 asset pipeline. Sweet!
63
56
  email:
64
57
  - eduvimaia@gmail.com
65
58
  executables: []
66
59
  extensions: []
67
60
  extra_rdoc_files: []
68
61
  files:
69
- - .gitignore
70
- - .travis.yml
71
- - Gemfile
72
62
  - LICENSE
73
63
  - README.md
74
- - Rakefile
64
+ - app/assets/javascripts/scriptcam.js.erb
65
+ - app/assets/javascripts/swfobject.js
66
+ - app/assets/swfs/scriptcam.swf
75
67
  - lib/scriptcam-rails.rb
76
68
  - lib/scriptcam-rails/engine.rb
77
69
  - lib/scriptcam-rails/version.rb
78
- - scriptcam-rails.gemspec
79
- - vendor/assets/javascripts/scriptcam.js
80
- - vendor/assets/javascripts/scriptcam.min.js
81
- - vendor/assets/javascripts/swfobject.js
82
- - vendor/assets/swfs/scriptcam.swf
83
70
  homepage: https://github.com/emaiax/scriptcam-rails
84
71
  licenses: []
72
+ metadata: {}
85
73
  post_install_message:
86
74
  rdoc_options: []
87
75
  require_paths:
88
76
  - lib
89
77
  required_ruby_version: !ruby/object:Gem::Requirement
90
- none: false
91
78
  requirements:
92
- - - ! '>='
79
+ - - ">="
93
80
  - !ruby/object:Gem::Version
94
81
  version: '0'
95
82
  required_rubygems_version: !ruby/object:Gem::Requirement
96
- none: false
97
83
  requirements:
98
- - - ! '>='
84
+ - - ">="
99
85
  - !ruby/object:Gem::Version
100
86
  version: '0'
101
87
  requirements: []
102
88
  rubyforge_project:
103
- rubygems_version: 1.8.24
89
+ rubygems_version: 2.2.2
104
90
  signing_key:
105
- specification_version: 3
106
- summary: ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
91
+ specification_version: 4
92
+ summary: ScriptCam, tastefully bundled for the Rails 4 asset pipeline. Sweet!
107
93
  test_files: []
108
- has_rdoc:
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- pkg
7
- .DS_Store
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "1.8.7"
4
- - "1.9.2"
5
- - "1.9.3"
6
- - jruby-18mode # JRuby in 1.8 mode
7
- - jruby-19mode # JRuby in 1.9 mode
8
- - rbx-18mode
9
- - rbx-19mode
10
- # uncomment this line if your project needs to run something other than `rake`:
11
- # # script: bundle exec rspec spec
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in scriptcam-rails.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
@@ -1,21 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/scriptcam-rails/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Eduardo Maia"]
6
- gem.email = ["eduvimaia@gmail.com"]
7
- gem.description = %q{ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!}
8
- gem.summary = %q{ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!}
9
- gem.homepage = "https://github.com/emaiax/scriptcam-rails"
10
-
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "scriptcam-rails"
15
- gem.require_paths = ["lib"]
16
- gem.version = Scriptcam::Rails::VERSION
17
-
18
- gem.add_dependency "railties", "> 3.1.0"
19
- gem.add_development_dependency "bundler", "~> 1.1.rc"
20
- gem.add_development_dependency "rake", "~> 0.9.2"
21
- end
@@ -1 +0,0 @@
1
- function SC_onError(e,t){$.scriptcam.SC_onError(e,t)}function SC_onMotion(e){$.scriptcam.SC_onMotion(e)}function SC_promptWillShow(){$.scriptcam.SC_promptWillShow()}function SC_onWebcamReady(e,t,n,r){$.scriptcam.SC_onWebcamReady(e,t,n,r)}function SC_onPictureAsBase64(e){$.scriptcam.SC_onPictureAsBase64(e)}function SC_connected(){$.scriptcam.SC_connected()}function SC_disconnected(){$.scriptcam.SC_disconnected()}function SC_setVolume(e){$.scriptcam.SC_setVolume(e)}function SC_onMotion(e,t,n,r){$.scriptcam.SC_onMotion(e,t,n,r)}function SC_timeLeft(e){$.scriptcam.SC_timeLeft(e)}function SC_addChatText(e){$.scriptcam.SC_addChatText(e)}(function(e){e.fn.scriptcam=function(t){var n=e.extend({},e.fn.scriptcam.defaults,t);return this.each(function(){n.id=this.id;data=n;e("#"+n.id).html(n.noFlashFound);e.scriptcam.SC_promptWillShow=data.promptWillShow;e.scriptcam.SC_onMotion=data.onMotion;e.scriptcam.SC_onError=data.onError;e.scriptcam.SC_onWebcamReady=data.onWebcamReady;e.scriptcam.SC_connected=data.connected;e.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;e.scriptcam.SC_disconnected=data.disconnected;e.scriptcam.SC_setVolume=data.setVolume;e.scriptcam.SC_timeLeft=data.timeLeft;e.scriptcam.SC_addChatText=function(t){t=t.replace(":{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(";)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');t=t.replace(";-)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');e("#"+data.chatWindow).append(t+"<br/>");e("#"+data.chatWindow).animate({scrollTop:e("#"+data.chatWindow).prop("scrollHeight")-e("#"+data.chatWindow).height()},100)};var t=n.width;if(n.chatRoom){t=t*2+5}if(n.chatRoom||n.fileName||n.daeFilename){var r={menu:"false",wmode:"direct"}}else{var r={menu:"false",wmode:"transparent"}}for(var i in n){n[i]=encodeURIComponent(n[i])}swfobject.embedSWF("/assets/scriptcam.swf",n.id,t,n.height,"11.4",false,n,r)})};e.scriptcam={};e.scriptcam.getFrameAsBase64=function(){return e("#"+data.id).get(0).SC_getFrameAsBase64()};e.scriptcam.version=function(){return e("#"+data.id).get(0).SC_version()};e.scriptcam.getMotionParameters=function(){e("#"+data.id).get(0).SC_getMotionParameters()};e.scriptcam.getBarCode=function(){return e("#"+data.id).get(0).SC_getBarCode()};e.scriptcam.startRecording=function(){e("#"+data.id).get(0).SC_startRecording()};e.scriptcam.closeCamera=function(){e("#"+data.id).get(0).SC_closeCamera()};e.scriptcam.changeVolume=function(t){e("#"+data.id).get(0).SC_changeVolume(t)};e.scriptcam.sendMessage=function(t){e("#"+data.id).get(0).SC_sendMessage(t)};e.scriptcam.changeCamera=function(t){e("#"+data.id).get(0).SC_changeCamera(t)};e.scriptcam.changeMicrophone=function(t){e("#"+data.id).get(0).SC_changeMicrophone(t)};e.fn.scriptcam.defaults={width:320,height:240,chatWindow:"chatWindow",path:"",noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software. Please click on the link to download the installer.</p>'}})(jQuery)