cosmetic changes

This commit is contained in:
rolux 2013-07-13 15:56:02 +02:00
parent daa17326db
commit d64f499034

View file

@ -34,114 +34,110 @@ Ox.VideoPanel = function(options, self) {
self = self || {}; self = self || {};
var that = Ox.Element({}, self) var that = Ox.Element({}, self)
.defaults({ .defaults({
annotationsCalendarSize: 256, annotationsCalendarSize: 256,
annotationsFont: 'small', annotationsFont: 'small',
annotationsMapSize: 256, annotationsMapSize: 256,
annotationsRange: 'all', annotationsRange: 'all',
annotationsSize: 256, annotationsSize: 256,
annotationsSort: 'position', annotationsSort: 'position',
annotationsTooltip: 'annotations', annotationsTooltip: 'annotations',
censored: [], censored: [],
censoredIcon: '', censoredIcon: '',
censoredTooltip: '', censoredTooltip: '',
clickLink: null, clickLink: null,
cuts: [], cuts: [],
duration: 0, duration: 0,
enableDownload: false, enableDownload: false,
enableSubtitles: false, enableSubtitles: false,
find: '', find: '',
fullscreen: false, fullscreen: false,
getLargeTimelineURL: null, getLargeTimelineURL: null,
height: 0, height: 0,
'in': 0, 'in': 0,
layers: [], layers: [],
loop: false, // fixme: used? loop: false,
muted: false, muted: false,
out: 0, out: 0,
paused: true, paused: true,
playInToOut: false, playInToOut: false,
position: 0, position: 0,
poster: '', poster: '',
resolution: 0, resolution: 0,
scaleToFill: false, scaleToFill: false,
selected: '', selected: '',
showAnnotations: false, showAnnotations: false,
showAnnotationsCalendar: false, showAnnotationsCalendar: false,
showAnnotationsMap: false, showAnnotationsMap: false,
showLayers: {}, showLayers: {},
showTimeline: true, showTimeline: false,
showUsers: false, showUsers: false,
smallTimelineURL: '', smallTimelineURL: '',
subtitles: [], subtitles: [],
timeline: '', timeline: '',
timelineTooltip: 'timeline', timelineTooltip: 'timeline',
video: '', video: '',
volume: 1, volume: 1,
width: 0 width: 0
}) })
.options(options || {}) .options(options || {})
.update({ .update({
fullscreen: function() { fullscreen: function() {
self.$video.options({fullscreen: self.options.fullscreen}); self.$video.options({fullscreen: self.options.fullscreen});
}, },
height: function() { height: function() {
self.$video.options({height: getPlayerHeight()}); self.$video.options({height: getPlayerHeight()});
}, },
'in': function() { 'in': function() {
setPoint('in', self.options['in']); setPoint('in', self.options['in']);
}, },
out: function() { out: function() {
setPoint('out', self.options.out); setPoint('out', self.options.out);
}, },
paused: function() { paused: function() {
self.$video.options({paused: self.options.paused}); self.$video.options({paused: self.options.paused});
}, },
position: function() { position: function() {
self.$video.options({position: self.options.position}); self.$video.options({position: self.options.position});
self.$timeline.options({position: self.options.position}); self.$timeline.options({position: self.options.position});
self.$annotationPanel.options({position: self.options.position}); self.$annotationPanel.options({position: self.options.position});
}, },
selected: function() { selected: function() {
self.$annotationPanel.options({selected: self.options.selected}); self.$annotationPanel.options({selected: self.options.selected});
}, },
showAnnotations: function() { showAnnotations: function() {
that.$element.toggle(1); that.$element.toggle(1);
}, },
showTimeline: function() { showTimeline: function() {
self.$videoPanel.toggle(1); self.$videoPanel.toggle(1);
}, },
timeline: function() { timeline: function() {
self.$timeline.options({type: self.options.timeline}); self.$timeline.options({type: self.options.timeline});
}, },
width: function() { width: function() {
self.$video.options({width: getPlayerWidth()}); self.$video.options({width: getPlayerWidth()});
self.$timeline.options({width: getTimelineWidth()}); self.$timeline.options({width: getTimelineWidth()});
} }
}) })
.css({ .css({
height: self.options.height + 'px', height: self.options.height + 'px',
width: self.options.width + 'px' width: self.options.width + 'px'
}) })
.bindEvent({ .bindEvent({
resize: resizeElement, resize: resizeElement,
key_0: toggleMuted, key_0: toggleMuted,
key_equal: function() { key_equal: function() {
self.$video.changeVolume(0.1); self.$video.changeVolume(0.1);
}, },
key_minus: function() { key_minus: function() {
self.$video.changeVolume(-0.1); self.$video.changeVolume(-0.1);
}, },
key_space: togglePaused key_space: togglePaused
}); });
self.fullscreen = false; self.fullscreen = false;
self.$player = Ox.Element() self.$player = Ox.Element().css({overflow: 'hidden'});
.css({
overflowX: 'hidden',
overflowY: 'hidden'
});
self.$video = Ox.VideoPlayer({ self.$video = Ox.VideoPlayer({
annotations: getAnnotations(), annotations: getAnnotations(),
@ -234,7 +230,7 @@ Ox.VideoPanel = function(options, self) {
out: self.options.out, out: self.options.out,
position: self.options.position, position: self.options.position,
subtitles: self.options.enableSubtitles ? self.options.subtitles : [], subtitles: self.options.enableSubtitles ? self.options.subtitles : [],
videoId: self.options.videoId, videoId: self.options.videoId, // fixme: not in defaults
type: self.options.timeline, type: self.options.timeline,
width: getTimelineWidth() width: getTimelineWidth()
}) })