update embed panel
This commit is contained in:
parent
0de3bb8527
commit
364771b8bf
1 changed files with 12 additions and 9 deletions
|
@ -16,17 +16,20 @@ pandora.ui.embedPanel = function() {
|
|||
'rightslevel', 'size', 'title', 'videoRatio'
|
||||
]}, function(result) {
|
||||
|
||||
video = result.data, innerHeight;
|
||||
Ox.extend(video, pandora.getVideoOptions(video));
|
||||
|
||||
if (options.matchRatio || options.showAnnotations) {
|
||||
options.height = Math.min(
|
||||
Math.round(window.innerWidth / video.videoRatio),
|
||||
window.innerHeight
|
||||
var innerHeight,
|
||||
maxHeight = window.innerHeight
|
||||
- (options.title ? 32 : 0)
|
||||
- (options.showTimeline ? 80 : 0)
|
||||
- (options.showAnnotations ? 128 : 0)
|
||||
);
|
||||
- (options.showAnnotations ? 128 : 0);
|
||||
|
||||
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
||||
|
||||
if (options.matchRatio || options.showAnnotations) {
|
||||
options.height = Math.round(window.innerWidth / video.videoRatio);
|
||||
options.matchRatio = options.height <= maxHeight;
|
||||
if (!options.matchRatio) {
|
||||
options.height = maxHeight;
|
||||
}
|
||||
} else {
|
||||
options.height = window.innerHeight
|
||||
- (options.title ? 32 : 0)
|
||||
|
|
Loading…
Reference in a new issue