embeddable 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -0
- data/lib/embeddable.rb +3 -0
- data/lib/embeddable/version.rb +1 -1
- data/lib/embeddable/view_helpers.rb +2 -0
- data/views/embeddable/partials/_brightcove.html.erb +8 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f2ab466c6cadbd615d9773926ea34341000a99
|
4
|
+
data.tar.gz: 9d213d00bafe3d515137494967076727b85236c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/embeddable.rb
CHANGED
data/lib/embeddable/version.rb
CHANGED
@@ -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.
|
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-
|
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
|