embeddable 0.0.6 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8059f99473e0a02ab6ce11f3f0b5984e6983f61c
4
- data.tar.gz: ac11c09418a66f3cf9196be49bf46cab659c0080
3
+ metadata.gz: 18f2ab466c6cadbd615d9773926ea34341000a99
4
+ data.tar.gz: 9d213d00bafe3d515137494967076727b85236c6
5
5
  SHA512:
6
- metadata.gz: 722cc79c9f8ffe438767855514be3ac3c00da45105857d154204dcf8167132f16e6e9ef170088cae8845aa049d8126ce383acf7b8289be5f664994660392b892
7
- data.tar.gz: b2e9b1f436d870057df169784245e5c9f4d26195ac375caaa75e8762234d2d5d2dbda733a605ec589b832746b2011a89babd438e857971d3e78515fdb5cab7ce
6
+ metadata.gz: 78354feb478b54c646977720ec78feb9090afc5b0aac146a619c753bf526c6770f693a93442899506dcf6a9d53810c3566ede6ed82ab5a1b7427d9aee5f83fe6
7
+ data.tar.gz: 6da0f5c692782ad05a7c7e55dd0795b5f410401f913aace349d2f77380293ff0da9fa6c1dbdabaddfadb162305e811ea4576c79256b944478a57fd1ef89c0e42
data/README.md CHANGED
@@ -39,6 +39,46 @@ post.video_on_youtube? # => true
39
39
  post.video_id # => 'bEvNRmPzq9s'
40
40
  ```
41
41
 
42
+ ### Brightcove
43
+ If you want to support brightcove, you'll need to add
44
+ your own brightcove player by overriding the brightcove partial.
45
+
46
+ 1. Create a partial in your project here: `app/views/embeddable/partials/_brightcove.html.erb`
47
+ 2. Add your brightcove player code(see example below)
48
+ 3. Remember to add the following parameters(included in the example below): `id`, `width`, `height`
49
+
50
+ ```html
51
+ <div class="BCLcontainingBlock">
52
+ <div class="BCLvideoWrapper">
53
+ <div style="display:none"></div>
54
+ <script type="text/javascript" src="https://sadmin.brightcove.com/js/BrightcoveExperiences.js"></script>
55
+
56
+ <object id="brightcove-<%= id %>" class="BrightcoveExperience">
57
+ <param name="secureConnections" value="true" />
58
+ <param name="bgcolor" value="#FFFFFF" />
59
+ <param name="width" value="<%= width %>" />
60
+ <param name="height" value="<%= height %>" />
61
+ <param name="playerID" value="Your player id" />
62
+ <param name="playerKey" value="Your player key" />
63
+ <param name="isVid" value="true" />
64
+ <param name="isUI" value="true" />
65
+ <param name="dynamicStreaming" value="true" />
66
+ <param name="wmode" value="transparent" />
67
+
68
+ <param name="@videoPlayer" value="<%= id %>" />
69
+
70
+ <param name="includeAPI" value="true" />
71
+ <param name="templateReadyHandler" value="onTemplateReady" />
72
+ </object>
73
+
74
+ <script type="text/javascript">brightcove.createExperiences();</script>
75
+
76
+ </div>
77
+ </div>
78
+ ```
79
+
80
+ If you used this example, you must remember to add your own `playerId` and `playerKey`
81
+
42
82
  ## Contributing
43
83
 
44
84
  1. Fork it
@@ -25,6 +25,9 @@ module Embeddable
25
25
  ],
26
26
  liveleak: [
27
27
  %r{^https?://(?:www\.)?liveleak\.com/view\?i=([^\?]+)},
28
+ ],
29
+ brightcove: [
30
+ %r{^(\d+)$}
28
31
  ]
29
32
  }
30
33
 
@@ -1,3 +1,3 @@
1
1
  module Embeddable
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -15,6 +15,8 @@ module ViewHelpers
15
15
  elsif embeddable.video_on_liveleak?
16
16
  # not supported
17
17
  link_to embeddable.url, embeddable.url
18
+ elsif embeddable.video_on_brightcove?
19
+ render 'embeddable/partials/brightcove', attributes
18
20
  else
19
21
  link_to embeddable.url, embeddable.url
20
22
  end
@@ -0,0 +1,8 @@
1
+ <p>Add your own brightcove player in <em>embeddable/partials/_brightcove.html.erb</em></p>
2
+ <p><strong>Params are:</strong></p>
3
+ <ul>
4
+ <li><strong>id:</strong> the video id</li>
5
+ <li><strong>width:</strong> the width of the video player</li>
6
+ <li><strong>height:</strong> the height of the video player</li>
7
+ </ul>
8
+ <p><strong>Check the readme for example</strong></p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embeddable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Gorset
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-21 00:00:00.000000000 Z
12
+ date: 2014-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -88,6 +88,7 @@ files:
88
88
  - lib/embeddable/view_helpers.rb
89
89
  - spec/lib/embeddable_spec.rb
90
90
  - spec/spec_helper.rb
91
+ - views/embeddable/partials/_brightcove.html.erb
91
92
  - views/embeddable/partials/_dailymotion.html.erb
92
93
  - views/embeddable/partials/_veoh.html.erb
93
94
  - views/embeddable/partials/_vimeo.html.erb