1
0
Fork 0
forked from 0x2620/oxjs

pass fullscreen option down to and up from video player

This commit is contained in:
rlx 2011-11-02 20:51:54 +00:00
commit bfac98643d
3 changed files with 14 additions and 1 deletions

View file

@ -18,6 +18,7 @@ Ox.VideoPanelPlayer = function(options, self) {
censored: [],
duration: 0,
find: '',
fullscreen: false,
height: 0,
'in': 0,
loop: false,
@ -74,6 +75,7 @@ Ox.VideoPanelPlayer = function(options, self) {
enableKeyboard: true,
enableMouse: true,
find: self.options.find,
fullscreen: self.options.fullscreen,
height: getPlayerHeight(),
'in': self.options['in'],
muted: self.options.muted,
@ -92,6 +94,9 @@ Ox.VideoPanelPlayer = function(options, self) {
self.$timeline.options({find: data.find});
that.triggerEvent('find', data);
},
fullscreen: function(data) {
self.options.fullscreen = data.fullscreen;
},
position: setPosition,
muted: function(data) {
that.triggerEvent('muted', data);
@ -257,7 +262,11 @@ Ox.VideoPanelPlayer = function(options, self) {
}
self.setOption = function(key, value) {
if (key == 'height') {
if (key == 'fullscreen') {
self.$video.options({
fullscreen: value
});
} else if (key == 'height') {
self.$video.options({
height: getPlayerHeight()
});