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 || {};
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()
})