flashcam-rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Flashcam
2
2
  module Rails
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -9,12 +9,15 @@
9
9
  // add flash to div
10
10
  opts.id = this.id; // add id of plugin to the options structure
11
11
  data = opts; // pass options to jquery internal data field to make them available to the outside world
12
+ data.path = decodeURIComponent(data.path); // convert URI back to normal string
12
13
 
13
14
  $('#'+opts.id).html(opts.noFlashFound); // inject no flash found message
14
15
 
15
16
  // forward incoming flash movie calls to outgoing functions
16
17
  $.flashcam.FC_onError = data.onError;
17
- $.flashcam.FC_showPrompt = data.showPrompt;
18
+ $.flashcam.FC_onShow = data.onShow;
19
+ $.flashcam.FC_onConnect = data.onConnect;
20
+ $.flashcam.FC_onDisconnect = data.onDisconnect;
18
21
 
19
22
  var newWidth = opts.width;
20
23
  var newHeight = opts.height;
@@ -30,7 +33,7 @@
30
33
  opts[key] = encodeURIComponent(opts[key]);
31
34
  };
32
35
 
33
- swfobject.embedSWF('/assets/flashcam.swf', opts.id, newWidth, newHeight, '11.4', false, opts, params);
36
+ swfobject.embedSWF(data.path + 'flashcam.swf', opts.id, newWidth, newHeight, '11.4', false, opts, params);
34
37
  });
35
38
  };
36
39
 
@@ -46,6 +49,7 @@
46
49
  $.fn.flashcam.defaults = {
47
50
  width:320,
48
51
  height:240,
52
+ path:'',
49
53
  noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software.<br/>Please click on the link to download the installer.</p>'
50
54
  };
51
55
  })(jQuery);
@@ -56,6 +60,14 @@ function FC_onError(errorId, errorMsg) {
56
60
  $.flashcam.FC_onError(errorId, errorMsg);
57
61
  }
58
62
 
59
- function FC_showPrompt() {
60
- $.flashcam.FC_showPrompt();
63
+ function FC_onShow() {
64
+ $.flashcam.FC_onShow();
65
+ }
66
+
67
+ function FC_onConnect() {
68
+ $.flashcam.FC_onConnect();
69
+ }
70
+
71
+ function FC_onDisconnect() {
72
+ $.flashcam.FC_onDisconnect();
61
73
  }
@@ -1 +1 @@
1
- function FC_onError(e,t){$.flashcam.FC_onError(e,t)}function FC_showPrompt(){$.flashcam.FC_showPrompt()}(function(e){e.fn.flashcam=function(t){var n=e.extend({},e.fn.flashcam.defaults,t);return this.each(function(){n.id=this.id;data=n;e("#"+n.id).html(n.noFlashFound);e.flashcam.FC_onError=data.onError;e.flashcam.FC_showPrompt=data.showPrompt;var t=n.width;var r=n.height;var i={menu:"false",wmode:"direct"};for(var s in n){n[s]=encodeURIComponent(n[s])}swfobject.embedSWF("/assets/flashcam.swf",n.id,t,r,"11.4",false,n,i)})};e.flashcam={};e.flashcam.version=function(){return e("#"+data.id).get(0).FC_version()};e.fn.flashcam.defaults={width:320,height:240,noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software.<br/>Please click on the link to download the installer.</p>'}})(jQuery)
1
+ (function($){$.fn.flashcam=function(options){var opts=$.extend({},$.fn.flashcam.defaults,options);return this.each(function(){opts.id=this.id;data=opts;data.path=decodeURIComponent(data.path);$("#"+opts.id).html(opts.noFlashFound);$.flashcam.FC_onError=data.onError;$.flashcam.FC_onShow=data.onShow;$.flashcam.FC_onConnect=data.onConnect;$.flashcam.FC_onDisconnect=data.onDisconnect;var newWidth=opts.width;var newHeight=opts.height;var params={menu:"false",wmode:"direct"};for(var key in opts){opts[key]=encodeURIComponent(opts[key])}swfobject.embedSWF(data.path+"flashcam.swf",opts.id,newWidth,newHeight,"11.4",false,opts,params)})};$.flashcam={};$.flashcam.version=function(){return $("#"+data.id).get(0).FC_version()};$.fn.flashcam.defaults={width:320,height:240,path:"",noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software.<br/>Please click on the link to download the installer.</p>'}})(jQuery);function FC_onError(errorId,errorMsg){$.flashcam.FC_onError(errorId,errorMsg)}function FC_onShow(){$.flashcam.FC_onShow()}function FC_onConnect(){$.flashcam.FC_onConnect()}function FC_onDisconnect(){$.flashcam.FC_onDisconnect()}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flashcam-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-14 00:00:00.000000000 Z
12
+ date: 2013-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -91,18 +91,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
- segments:
95
- - 0
96
- hash: 222546776963721376
97
94
  required_rubygems_version: !ruby/object:Gem::Requirement
98
95
  none: false
99
96
  requirements:
100
97
  - - ! '>='
101
98
  - !ruby/object:Gem::Version
102
99
  version: '0'
103
- segments:
104
- - 0
105
- hash: 222546776963721376
106
100
  requirements: []
107
101
  rubyforge_project:
108
102
  rubygems_version: 1.8.24
@@ -110,3 +104,4 @@ signing_key:
110
104
  specification_version: 3
111
105
  summary: Flashcam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
112
106
  test_files: []
107
+ has_rdoc: