update embed panel

This commit is contained in:
rolux 2013-02-20 15:51:24 +05:30
parent 0de3bb8527
commit 364771b8bf

View file

@ -16,17 +16,20 @@ pandora.ui.embedPanel = function() {
'rightslevel', 'size', 'title', 'videoRatio' 'rightslevel', 'size', 'title', 'videoRatio'
]}, function(result) { ]}, function(result) {
video = result.data, innerHeight; var innerHeight,
Ox.extend(video, pandora.getVideoOptions(video)); maxHeight = window.innerHeight
- (options.title ? 32 : 0)
- (options.showTimeline ? 80 : 0)
- (options.showAnnotations ? 128 : 0);
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
if (options.matchRatio || options.showAnnotations) { if (options.matchRatio || options.showAnnotations) {
options.height = Math.min( options.height = Math.round(window.innerWidth / video.videoRatio);
Math.round(window.innerWidth / video.videoRatio), options.matchRatio = options.height <= maxHeight;
window.innerHeight if (!options.matchRatio) {
- (options.title ? 32 : 0) options.height = maxHeight;
- (options.showTimeline ? 80 : 0) }
- (options.showAnnotations ? 128 : 0)
);
} else { } else {
options.height = window.innerHeight options.height = window.innerHeight
- (options.title ? 32 : 0) - (options.title ? 32 : 0)