in video panel player, rename showControls to showTimeline
This commit is contained in:
parent
2b3d8807d9
commit
8eac8c20d7
2 changed files with 14 additions and 23 deletions
|
@ -30,7 +30,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
poster: '',
|
poster: '',
|
||||||
scaleToFill: false,
|
scaleToFill: false,
|
||||||
showAnnotations: true,
|
showAnnotations: true,
|
||||||
showControls: true,
|
showTimeline: true,
|
||||||
subtitles: [],
|
subtitles: [],
|
||||||
tooltips: false,
|
tooltips: false,
|
||||||
video: '',
|
video: '',
|
||||||
|
@ -44,15 +44,6 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
resize: resizeElement,
|
resize: resizeElement,
|
||||||
key_shift_a: function() {
|
|
||||||
that.toggleAnnotations();
|
|
||||||
},
|
|
||||||
key_shift_c: function() {
|
|
||||||
that.toggleControls();
|
|
||||||
},
|
|
||||||
key_shift_s: function() {
|
|
||||||
that.toggleSize();
|
|
||||||
},
|
|
||||||
key_space: function() {
|
key_space: function() {
|
||||||
that.togglePlay();
|
that.togglePlay();
|
||||||
}
|
}
|
||||||
|
@ -142,7 +133,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
element: self.$player
|
element: self.$player
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
collapsed: !self.options.showControls,
|
collapsed: !self.options.showTimeline,
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
element: self.$controls,
|
element: self.$controls,
|
||||||
size: 80,
|
size: 80,
|
||||||
|
@ -188,7 +179,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
|
|
||||||
function getPlayerHeight() {
|
function getPlayerHeight() {
|
||||||
return self.options.height -
|
return self.options.height -
|
||||||
self.options.showControls * 80 - 1;
|
self.options.showTimeline * 80 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPlayerWidth() {
|
function getPlayerWidth() {
|
||||||
|
@ -258,12 +249,12 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleControls(data) {
|
function toggleControls(data) {
|
||||||
self.options.showControls = !data.collapsed;
|
self.options.showTimeline = !data.collapsed;
|
||||||
self.$video.options({
|
self.$video.options({
|
||||||
height: getPlayerHeight()
|
height: getPlayerHeight()
|
||||||
});
|
});
|
||||||
that.triggerEvent('togglecontrols', {
|
that.triggerEvent('toggletimeline', {
|
||||||
showControls: self.options.showControls
|
showTimeline: self.options.showTimeline
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +276,8 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
});
|
});
|
||||||
} else if (key == 'showAnnotations') {
|
} else if (key == 'showAnnotations') {
|
||||||
that.$element.toggle(1);
|
that.$element.toggle(1);
|
||||||
|
} else if (key == 'showTimeline') {
|
||||||
|
self.$panel.toggle(1);
|
||||||
} else if (key == 'width') {
|
} else if (key == 'width') {
|
||||||
self.$video.options({
|
self.$video.options({
|
||||||
width: getPlayerWidth()
|
width: getPlayerWidth()
|
||||||
|
@ -295,22 +288,22 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fixme: can these be removed?
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
toggleAnnotations <f> toggle annotations
|
toggleAnnotations <f> toggle annotations
|
||||||
() -> <o> toggle visibility of annotations
|
() -> <o> toggle visibility of annotations
|
||||||
@*/
|
@*/
|
||||||
that.toggleAnnotations = function() {
|
that.toggleAnnotations = function() {
|
||||||
that.$element.toggle(1);
|
that.$element.toggle(1);
|
||||||
//that.toggleAnnotations(null, !self.options.showAnnotations);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
toggleControls <f> toggle controls
|
toggleTimeline <f> toggle timeline
|
||||||
() -> <o> toggle visibility of controls
|
() -> <o> toggle visibility of timeline
|
||||||
@*/
|
@*/
|
||||||
that.toggleControls = function() {
|
that.toggleTimeline = function() {
|
||||||
self.$panel.toggle(1);
|
self.$panel.toggle(1);
|
||||||
//that.toggleControls(null, !self.options.showControls);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
Ox.VideoPlayer <f> Generic Video Player
|
Ox.VideoPlayer <f> Generic Video Player
|
||||||
(options, self) -> <o> Video Player
|
(options, self) -> <o> Video Player
|
||||||
|
@ -132,7 +130,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxVideoPlayer');
|
.addClass('OxVideoPlayer');
|
||||||
|
|
||||||
Ox.Log('Video', 'VIDEO PLAYER OPTIONS', self.options)
|
Ox.Log('VIDEO', 'VIDEO PLAYER OPTIONS', self.options)
|
||||||
|
|
||||||
Ox.UI.$window.bind({
|
Ox.UI.$window.bind({
|
||||||
resize: function() {
|
resize: function() {
|
||||||
|
|
Loading…
Reference in a new issue