mirror of
https://github.com/videojs/video.js.git
synced 2025-07-13 01:30:17 +02:00
Cleaned up code from text track additions.
This commit is contained in:
@ -167,8 +167,6 @@ so you can upgrade to newer versions easier. You can remove all these styles by
|
|||||||
background: -o-linear-gradient(top, #333, #666);
|
background: -o-linear-gradient(top, #333, #666);
|
||||||
background: -ms-linear-gradient(top, #333, #666);
|
background: -ms-linear-gradient(top, #333, #666);
|
||||||
background: linear-gradient(top, #333, #666);
|
background: linear-gradient(top, #333, #666);
|
||||||
|
|
||||||
border: 1px solid #000;
|
|
||||||
}
|
}
|
||||||
.vjs-default-skin .vjs-volume-level {
|
.vjs-default-skin .vjs-volume-level {
|
||||||
position: absolute; top: 0; left: 0; height: 0.6em;
|
position: absolute; top: 0; left: 0; height: 0.6em;
|
||||||
|
55
src/controls.js
vendored
55
src/controls.js
vendored
@ -789,3 +789,58 @@ _V_.Poster = _V_.Button.extend({
|
|||||||
this.player.play();
|
this.player.play();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* Menu
|
||||||
|
================================================================================ */
|
||||||
|
// The base for text track and settings menu buttons.
|
||||||
|
_V_.Menu = _V_.Component.extend({
|
||||||
|
|
||||||
|
init: function(player, options){
|
||||||
|
this._super(player, options);
|
||||||
|
},
|
||||||
|
|
||||||
|
addItem: function(component){
|
||||||
|
this.addComponent(component);
|
||||||
|
component.addEvent("click", this.proxy(function(){
|
||||||
|
this.unlockShowing();
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
createElement: function(){
|
||||||
|
return this._super("ul", {
|
||||||
|
className: "vjs-menu"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
_V_.MenuItem = _V_.Button.extend({
|
||||||
|
|
||||||
|
init: function(player, options){
|
||||||
|
this._super(player, options);
|
||||||
|
|
||||||
|
if (options.selected) {
|
||||||
|
this.addClass("vjs-selected");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
createElement: function(type, attrs){
|
||||||
|
return this._super("li", _V_.merge({
|
||||||
|
className: "vjs-menu-item",
|
||||||
|
innerHTML: this.options.label
|
||||||
|
}, attrs));
|
||||||
|
},
|
||||||
|
|
||||||
|
onClick: function(){
|
||||||
|
this.selected(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
selected: function(selected){
|
||||||
|
if (selected) {
|
||||||
|
this.addClass("vjs-selected");
|
||||||
|
} else {
|
||||||
|
this.removeClass("vjs-selected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
@ -464,60 +464,8 @@ _V_.TextTrackDisplay = _V_.Component.extend({
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Menu
|
/* Text Track Menu Items
|
||||||
================================================================================ */
|
================================================================================ */
|
||||||
_V_.Menu = _V_.Component.extend({
|
|
||||||
|
|
||||||
init: function(player, options){
|
|
||||||
this._super(player, options);
|
|
||||||
},
|
|
||||||
|
|
||||||
addItem: function(component){
|
|
||||||
this.addComponent(component);
|
|
||||||
component.addEvent("click", this.proxy(function(){
|
|
||||||
this.unlockShowing();
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
|
|
||||||
createElement: function(){
|
|
||||||
return this._super("ul", {
|
|
||||||
className: "vjs-menu"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
_V_.MenuItem = _V_.Button.extend({
|
|
||||||
|
|
||||||
init: function(player, options){
|
|
||||||
this._super(player, options);
|
|
||||||
|
|
||||||
if (options.selected) {
|
|
||||||
this.addClass("vjs-selected");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
createElement: function(type, attrs){
|
|
||||||
return this._super("li", _V_.merge({
|
|
||||||
className: "vjs-menu-item",
|
|
||||||
innerHTML: this.options.label
|
|
||||||
}, attrs));
|
|
||||||
},
|
|
||||||
|
|
||||||
onClick: function(){
|
|
||||||
this.selected(true);
|
|
||||||
},
|
|
||||||
|
|
||||||
selected: function(selected){
|
|
||||||
if (selected) {
|
|
||||||
this.addClass("vjs-selected");
|
|
||||||
} else {
|
|
||||||
this.removeClass("vjs-selected")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
_V_.TextTrackMenuItem = _V_.MenuItem.extend({
|
_V_.TextTrackMenuItem = _V_.MenuItem.extend({
|
||||||
|
|
||||||
init: function(player, options){
|
init: function(player, options){
|
||||||
|
Reference in New Issue
Block a user