embed player: cleanup, post 'loaded' message later

This commit is contained in:
rolux 2013-03-02 12:10:37 +05:30
parent 270a6ccb49
commit 8067fd4629

View file

@ -90,7 +90,7 @@ pandora.ui.embedPlayer = function() {
enableVolume: !isFrame, enableVolume: !isFrame,
height: options.height, height: options.height,
invertHighlight: options.invertHighlight, invertHighlight: options.invertHighlight,
muted: pandora.user.ui.videoMuted, muted: ui.videoMuted,
paused: options.paused, paused: options.paused,
playInToOut: options.playInToOut, playInToOut: options.playInToOut,
position: options.position, position: options.position,
@ -99,8 +99,8 @@ pandora.ui.embedPlayer = function() {
: options['in'] !== void 0 ? options['in'] : options['in'] !== void 0 ? options['in']
: video.posterFrame : video.posterFrame
) +'.jpg', ) +'.jpg',
resolution: pandora.user.ui.videoResolution, resolution: ui.videoResolution,
scaleToFill: pandora.user.ui.videoScale == 'fill', scaleToFill: ui.videoScale == 'fill',
subtitles: video.subtitles, subtitles: video.subtitles,
timeline: options.playInToOut ? function(size, i) { timeline: options.playInToOut ? function(size, i) {
return '/' + options.item return '/' + options.item
@ -113,7 +113,7 @@ pandora.ui.embedPlayer = function() {
? pandora.site.timelines : [], ? pandora.site.timelines : [],
title: video.title, title: video.title,
video: video.video, video: video.video,
volume: pandora.user.ui.videoVolume, volume: ui.videoVolume,
width: options.width width: options.width
}, options['in'] ? { }, options['in'] ? {
'in': options['in'] 'in': options['in']
@ -244,6 +244,8 @@ pandora.ui.embedPlayer = function() {
that.setElement($outerPanel); that.setElement($outerPanel);
Ox.$parent.postMessage('loaded');
}); });
function changeTimeline(data) { function changeTimeline(data) {
@ -327,8 +329,6 @@ pandora.ui.embedPlayer = function() {
return that; return that;
}; };
Ox.$parent.postMessage('loaded');
return that; return that;
}; };