pass fullscreen option down to and up from video player
This commit is contained in:
parent
0840d0b436
commit
bfac98643d
3 changed files with 14 additions and 1 deletions
|
@ -243,6 +243,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
self.video.pause();
|
self.video.pause();
|
||||||
self.video.currentTime = 0;
|
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.items[self.currentItem].$videos[part].css(css).show();
|
||||||
self.video = self.$video[0];
|
self.video = self.$video[0];
|
||||||
!self.paused && self.video.play();
|
!self.paused && self.video.play();
|
||||||
|
|
|
@ -18,6 +18,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
censored: [],
|
censored: [],
|
||||||
duration: 0,
|
duration: 0,
|
||||||
find: '',
|
find: '',
|
||||||
|
fullscreen: false,
|
||||||
height: 0,
|
height: 0,
|
||||||
'in': 0,
|
'in': 0,
|
||||||
loop: false,
|
loop: false,
|
||||||
|
@ -74,6 +75,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
enableKeyboard: true,
|
enableKeyboard: true,
|
||||||
enableMouse: true,
|
enableMouse: true,
|
||||||
find: self.options.find,
|
find: self.options.find,
|
||||||
|
fullscreen: self.options.fullscreen,
|
||||||
height: getPlayerHeight(),
|
height: getPlayerHeight(),
|
||||||
'in': self.options['in'],
|
'in': self.options['in'],
|
||||||
muted: self.options.muted,
|
muted: self.options.muted,
|
||||||
|
@ -92,6 +94,9 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
self.$timeline.options({find: data.find});
|
self.$timeline.options({find: data.find});
|
||||||
that.triggerEvent('find', data);
|
that.triggerEvent('find', data);
|
||||||
},
|
},
|
||||||
|
fullscreen: function(data) {
|
||||||
|
self.options.fullscreen = data.fullscreen;
|
||||||
|
},
|
||||||
position: setPosition,
|
position: setPosition,
|
||||||
muted: function(data) {
|
muted: function(data) {
|
||||||
that.triggerEvent('muted', data);
|
that.triggerEvent('muted', data);
|
||||||
|
@ -257,7 +262,11 @@ Ox.VideoPanelPlayer = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.setOption = function(key, value) {
|
self.setOption = function(key, value) {
|
||||||
if (key == 'height') {
|
if (key == 'fullscreen') {
|
||||||
|
self.$video.options({
|
||||||
|
fullscreen: value
|
||||||
|
});
|
||||||
|
} else if (key == 'height') {
|
||||||
self.$video.options({
|
self.$video.options({
|
||||||
height: getPlayerHeight()
|
height: getPlayerHeight()
|
||||||
});
|
});
|
||||||
|
|
|
@ -2089,6 +2089,9 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
if (self.$fullscreenButton && from != 'button') {
|
if (self.$fullscreenButton && from != 'button') {
|
||||||
self.$fullscreenButton.toggleTitle();
|
self.$fullscreenButton.toggleTitle();
|
||||||
}
|
}
|
||||||
|
that.triggerEvent('fullscreen', {
|
||||||
|
fullscreen: self.options.fullscreen
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleMuted(from) {
|
function toggleMuted(from) {
|
||||||
|
|
Loading…
Reference in a new issue