1
0
Fork 0
forked from 0x2620/oxjs

handle video formats and resolutions

This commit is contained in:
rlx 2011-08-19 14:44:03 +00:00
commit ba96bfb76c
5 changed files with 45 additions and 16 deletions

View file

@ -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')
}
});
}