add open control to video player

This commit is contained in:
rlx 2011-12-23 10:51:35 +00:00
parent 21f703c6c4
commit 423faa5450

View file

@ -14,7 +14,7 @@ Ox.VideoPlayer <f> Generic Video Player
text <s> Text text <s> Text
censored <a|[]> Array of censored ranges censored <a|[]> Array of censored ranges
controlsBottom <[s]|[]> Bottom controls, from left to right controlsBottom <[s]|[]> Bottom controls, from left to right
Can be 'close', fullscreen', 'scale', 'title', 'find', 'menu', Can be 'close', fullscreen', 'scale', 'title', 'find', 'open',
'play', 'playInToOut', 'previous', 'next', 'mute', 'volume', 'size', 'play', 'playInToOut', 'previous', 'next', 'mute', 'volume', 'size',
'timeline', 'space', 'position', 'settings'. The 'space' control is 'timeline', 'space', 'position', 'settings'. The 'space' control is
empty space that separates left-aligned from right-aligned controls. empty space that separates left-aligned from right-aligned controls.
@ -594,6 +594,23 @@ Ox.VideoPlayer = function(options, self) {
}) })
.appendTo(self['$controls' + titleCase]); .appendTo(self['$controls' + titleCase]);
} else if (control == 'open') {
self.$openButton = Ox.Button({
style: 'symbol',
title: 'arrowRight',
tooltip: 'Open in ' + Ox.getObjectById(
pandora.site.itemViews, pandora.user.ui.videoView
).title + ' View',
type: 'image'
})
.bindEvent({
click: function() {
that.triggerEvent('open');
}
})
.appendTo(self['$controls' + titleCase]);
} else if (control == 'play') { } else if (control == 'play') {
self.$playButton = Ox.Button({ self.$playButton = Ox.Button({