forked from 0x2620/oxjs
handle video formats and resolutions
This commit is contained in:
parent
c5bde89971
commit
ba96bfb76c
5 changed files with 45 additions and 16 deletions
|
|
@ -124,6 +124,8 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.options(options || {})
|
||||
.addClass('OxVideoPlayer');
|
||||
|
||||
Ox.print('VIDEO PLAYER OPTIONS', self.options)
|
||||
|
||||
Ox.UI.$window.bind({
|
||||
resize: function() {
|
||||
self.options.fullscreen && setSizes();
|
||||
|
|
@ -133,14 +135,11 @@ Ox.VideoPlayer = function(options, self) {
|
|||
if (Ox.isString(self.options.video)) {
|
||||
self.video = self.options.video;
|
||||
} else {
|
||||
/*
|
||||
self.resolutions = Ox.sort(Object.keys(self.options.video));
|
||||
if (!(self.options.resolution in self.options.video)) {
|
||||
self.options.resolution = self.resolutions[0];
|
||||
}
|
||||
self.video = self.options.video[self.options.resolution];
|
||||
*/
|
||||
self.video = self.options.video(self.options.resolution, self.options.format)
|
||||
}
|
||||
|
||||
if (self.options.playInToOut) {
|
||||
|
|
@ -238,12 +237,12 @@ Ox.VideoPlayer = function(options, self) {
|
|||
mouseenter: function() {
|
||||
showControls();
|
||||
self.mouseHasLeft = false;
|
||||
Ox.print('MOUSE HAS ENTERED')
|
||||
//Ox.print('MOUSE HAS ENTERED')
|
||||
},
|
||||
mouseleave: function() {
|
||||
hideControls();
|
||||
self.mouseHasLeft = true;
|
||||
Ox.print('MOUSE HAS LEFT')
|
||||
//Ox.print('MOUSE HAS LEFT')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue