media-element-logo-plugin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +22 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/Guardfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/app/assets/images/_thumb_11185.png +0 -0
- data/app/assets/images/i.ai +6551 -26
- data/app/assets/images/me-logo.png +0 -0
- data/app/assets/images/me-logo.svg +71 -0
- data/app/assets/images/me-logo2.svg +795 -0
- data/app/assets/images/me-logo5.svg +10 -0
- data/app/assets/javascripts/me-logo.coffee +30 -0
- data/app/assets/javascripts/me-logo.js +29 -0
- data/app/assets/stylesheets/me-logo.css.erb +3 -0
- data/lib/media-element-logo-plugin.rb +5 -0
- data/lib/media-element-logo-plugin/engine.rb +4 -0
- data/lib/media-element-logo-plugin/version.rb +3 -0
- data/media-element-logo-plugin.gemspec +27 -0
- metadata +131 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg" version="1.1"
|
4
|
+
width="100" height="100" viewBox="0 0 1792 1792">
|
5
|
+
|
6
|
+
<path transform="translate(0,1536) scale(1,-1)"
|
7
|
+
fill="#dedede"
|
8
|
+
d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z"/>
|
9
|
+
|
10
|
+
</svg>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
(($)->
|
2
|
+
|
3
|
+
$.extend mejs.MepDefaults,
|
4
|
+
logoURL: null
|
5
|
+
logoAction: null
|
6
|
+
logoTitle: ''
|
7
|
+
|
8
|
+
$.extend MediaElementPlayer::,
|
9
|
+
|
10
|
+
buildlogo: (player, controls, layers, media) ->
|
11
|
+
return unless player.options.logoAction and
|
12
|
+
player.options.logoURL
|
13
|
+
|
14
|
+
|
15
|
+
button = $("<div class='mejs-button mejs-logo-selector'>
|
16
|
+
<button type='button' aria-controls='mep_0' title='#{player.options.logoTitle}' aria-label='#{player.options.logoTitle}'/>
|
17
|
+
</div>")
|
18
|
+
|
19
|
+
button.appendTo(controls)
|
20
|
+
|
21
|
+
button.click (event) ->
|
22
|
+
# event.preventDefault()
|
23
|
+
url = player.options.logoURL
|
24
|
+
if player.options.logoAction == 'redirect'
|
25
|
+
window.location = url
|
26
|
+
else
|
27
|
+
window.open url
|
28
|
+
|
29
|
+
|
30
|
+
)(mejs.$)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
(function() {
|
2
|
+
(function($) {
|
3
|
+
$.extend(mejs.MepDefaults, {
|
4
|
+
logoURL: null,
|
5
|
+
logoAction: null,
|
6
|
+
logoTitle: ''
|
7
|
+
});
|
8
|
+
return $.extend(MediaElementPlayer.prototype, {
|
9
|
+
buildlogo: function(player, controls, layers, media) {
|
10
|
+
var button;
|
11
|
+
if (!(player.options.logoAction && player.options.logoURL)) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
button = $("<div class='mejs-button mejs-logo-selector'> <button type='button' aria-controls='mep_0' title='" + player.options.logoTitle + "' aria-label='" + player.options.logoTitle + "'/> </div>");
|
15
|
+
button.appendTo(controls);
|
16
|
+
return button.click(function(event) {
|
17
|
+
var url;
|
18
|
+
url = player.options.logoURL;
|
19
|
+
if (player.options.logoAction === 'redirect') {
|
20
|
+
return window.location = url;
|
21
|
+
} else {
|
22
|
+
return window.open(url);
|
23
|
+
}
|
24
|
+
});
|
25
|
+
}
|
26
|
+
});
|
27
|
+
})(mejs.$);
|
28
|
+
|
29
|
+
}).call(this);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'media-element-logo-plugin/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'media-element-logo-plugin'
|
8
|
+
spec.version = MediaElementLogoPlugin::VERSION
|
9
|
+
spec.authors = ['Adam Hallett']
|
10
|
+
spec.email = ['adam.t.hallett@gmail.com']
|
11
|
+
spec.summary = %q{A media element plugin for adding a logo to the scrubber bar.}
|
12
|
+
spec.description = %q{The logo on the scrubber bar opens a window or links back to the original page.}
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'guard-coffeescript'
|
24
|
+
|
25
|
+
spec.add_dependency 'rails', '~> 3.2.3'
|
26
|
+
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: media-element-logo-plugin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Adam Hallett
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.6'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.6'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: guard-coffeescript
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rails
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 3.2.3
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 3.2.3
|
78
|
+
description: The logo on the scrubber bar opens a window or links back to the original
|
79
|
+
page.
|
80
|
+
email:
|
81
|
+
- adam.t.hallett@gmail.com
|
82
|
+
executables: []
|
83
|
+
extensions: []
|
84
|
+
extra_rdoc_files: []
|
85
|
+
files:
|
86
|
+
- .gitignore
|
87
|
+
- .ruby-version
|
88
|
+
- Gemfile
|
89
|
+
- Guardfile
|
90
|
+
- LICENSE.txt
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- app/assets/images/_thumb_11185.png
|
94
|
+
- app/assets/images/i.ai
|
95
|
+
- app/assets/images/me-logo.png
|
96
|
+
- app/assets/images/me-logo.svg
|
97
|
+
- app/assets/images/me-logo2.svg
|
98
|
+
- app/assets/images/me-logo5.svg
|
99
|
+
- app/assets/javascripts/me-logo.coffee
|
100
|
+
- app/assets/javascripts/me-logo.js
|
101
|
+
- app/assets/stylesheets/me-logo.css.erb
|
102
|
+
- lib/media-element-logo-plugin.rb
|
103
|
+
- lib/media-element-logo-plugin/engine.rb
|
104
|
+
- lib/media-element-logo-plugin/version.rb
|
105
|
+
- media-element-logo-plugin.gemspec
|
106
|
+
homepage: ''
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 1.8.23
|
128
|
+
signing_key:
|
129
|
+
specification_version: 3
|
130
|
+
summary: A media element plugin for adding a logo to the scrubber bar.
|
131
|
+
test_files: []
|