pass fullscreen option down to and up from video player

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

View file

@ -243,6 +243,7 @@ Ox.VideoElement = function(options, self) {
self.video.pause();
self.video.currentTime = 0;
}
Ox.print('?????', self.items[self.currentItem].$videos)
self.$video = self.items[self.currentItem].$videos[part].css(css).show();
self.video = self.$video[0];
!self.paused && self.video.play();

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()
});

View file

@ -2089,6 +2089,9 @@ Ox.VideoPlayer = function(options, self) {
if (self.$fullscreenButton && from != 'button') {
self.$fullscreenButton.toggleTitle();
}
that.triggerEvent('fullscreen', {
fullscreen: self.options.fullscreen
});
}
function toggleMuted(from) {