From d64f499034183c2cdb218d0c9768d10532feb893 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 13 Jul 2013 15:56:02 +0200 Subject: [PATCH] cosmetic changes --- source/Ox.UI/js/Video/VideoPanel.js | 208 ++++++++++++++-------------- 1 file changed, 102 insertions(+), 106 deletions(-) diff --git a/source/Ox.UI/js/Video/VideoPanel.js b/source/Ox.UI/js/Video/VideoPanel.js index 6e7709c5..231888df 100644 --- a/source/Ox.UI/js/Video/VideoPanel.js +++ b/source/Ox.UI/js/Video/VideoPanel.js @@ -34,114 +34,110 @@ Ox.VideoPanel = function(options, self) { self = self || {}; var that = Ox.Element({}, self) - .defaults({ - annotationsCalendarSize: 256, - annotationsFont: 'small', - annotationsMapSize: 256, - annotationsRange: 'all', - annotationsSize: 256, - annotationsSort: 'position', - annotationsTooltip: 'annotations', - censored: [], - censoredIcon: '', - censoredTooltip: '', - clickLink: null, - cuts: [], - duration: 0, - enableDownload: false, - enableSubtitles: false, - find: '', - fullscreen: false, - getLargeTimelineURL: null, - height: 0, - 'in': 0, - layers: [], - loop: false, // fixme: used? - muted: false, - out: 0, - paused: true, - playInToOut: false, - position: 0, - poster: '', - resolution: 0, - scaleToFill: false, - selected: '', - showAnnotations: false, - showAnnotationsCalendar: false, - showAnnotationsMap: false, - showLayers: {}, - showTimeline: true, - showUsers: false, - smallTimelineURL: '', - subtitles: [], - timeline: '', - timelineTooltip: 'timeline', - video: '', - volume: 1, - width: 0 - }) - .options(options || {}) - .update({ - fullscreen: function() { - self.$video.options({fullscreen: self.options.fullscreen}); - }, - height: function() { - self.$video.options({height: getPlayerHeight()}); - }, - 'in': function() { - setPoint('in', self.options['in']); - }, - out: function() { - setPoint('out', self.options.out); - }, - paused: function() { - self.$video.options({paused: self.options.paused}); - }, - position: function() { - self.$video.options({position: self.options.position}); - self.$timeline.options({position: self.options.position}); - self.$annotationPanel.options({position: self.options.position}); - }, - selected: function() { - self.$annotationPanel.options({selected: self.options.selected}); - }, - showAnnotations: function() { - that.$element.toggle(1); - }, - showTimeline: function() { - self.$videoPanel.toggle(1); - }, - timeline: function() { - self.$timeline.options({type: self.options.timeline}); - }, - width: function() { - self.$video.options({width: getPlayerWidth()}); - self.$timeline.options({width: getTimelineWidth()}); - } - }) - .css({ - height: self.options.height + 'px', - width: self.options.width + 'px' - }) - .bindEvent({ - resize: resizeElement, - key_0: toggleMuted, - key_equal: function() { - self.$video.changeVolume(0.1); - }, - key_minus: function() { - self.$video.changeVolume(-0.1); - }, - key_space: togglePaused - }); + .defaults({ + annotationsCalendarSize: 256, + annotationsFont: 'small', + annotationsMapSize: 256, + annotationsRange: 'all', + annotationsSize: 256, + annotationsSort: 'position', + annotationsTooltip: 'annotations', + censored: [], + censoredIcon: '', + censoredTooltip: '', + clickLink: null, + cuts: [], + duration: 0, + enableDownload: false, + enableSubtitles: false, + find: '', + fullscreen: false, + getLargeTimelineURL: null, + height: 0, + 'in': 0, + layers: [], + loop: false, + muted: false, + out: 0, + paused: true, + playInToOut: false, + position: 0, + poster: '', + resolution: 0, + scaleToFill: false, + selected: '', + showAnnotations: false, + showAnnotationsCalendar: false, + showAnnotationsMap: false, + showLayers: {}, + showTimeline: false, + showUsers: false, + smallTimelineURL: '', + subtitles: [], + timeline: '', + timelineTooltip: 'timeline', + video: '', + volume: 1, + width: 0 + }) + .options(options || {}) + .update({ + fullscreen: function() { + self.$video.options({fullscreen: self.options.fullscreen}); + }, + height: function() { + self.$video.options({height: getPlayerHeight()}); + }, + 'in': function() { + setPoint('in', self.options['in']); + }, + out: function() { + setPoint('out', self.options.out); + }, + paused: function() { + self.$video.options({paused: self.options.paused}); + }, + position: function() { + self.$video.options({position: self.options.position}); + self.$timeline.options({position: self.options.position}); + self.$annotationPanel.options({position: self.options.position}); + }, + selected: function() { + self.$annotationPanel.options({selected: self.options.selected}); + }, + showAnnotations: function() { + that.$element.toggle(1); + }, + showTimeline: function() { + self.$videoPanel.toggle(1); + }, + timeline: function() { + self.$timeline.options({type: self.options.timeline}); + }, + width: function() { + self.$video.options({width: getPlayerWidth()}); + self.$timeline.options({width: getTimelineWidth()}); + } + }) + .css({ + height: self.options.height + 'px', + width: self.options.width + 'px' + }) + .bindEvent({ + resize: resizeElement, + key_0: toggleMuted, + key_equal: function() { + self.$video.changeVolume(0.1); + }, + key_minus: function() { + self.$video.changeVolume(-0.1); + }, + key_space: togglePaused + }); self.fullscreen = false; - self.$player = Ox.Element() - .css({ - overflowX: 'hidden', - overflowY: 'hidden' - }); + self.$player = Ox.Element().css({overflow: 'hidden'}); self.$video = Ox.VideoPlayer({ annotations: getAnnotations(), @@ -234,7 +230,7 @@ Ox.VideoPanel = function(options, self) { out: self.options.out, position: self.options.position, subtitles: self.options.enableSubtitles ? self.options.subtitles : [], - videoId: self.options.videoId, + videoId: self.options.videoId, // fixme: not in defaults type: self.options.timeline, width: getTimelineWidth() })