From: ScottDowne Date: Wed, 11 May 2011 20:22:59 +0000 (-0400) Subject: [#t486] generating container div for vimeo object X-Git-Tag: v0.6~10^2~10^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=78e4c623ec2e11e8a22601b42eb55bacbc5da75f;p=popcorn-js.git [#t486] generating container div for vimeo object --- diff --git a/players/vimeo/popcorn.vimeo.js b/players/vimeo/popcorn.vimeo.js index d2c3b26..1a481cc 100644 --- a/players/vimeo/popcorn.vimeo.js +++ b/players/vimeo/popcorn.vimeo.js @@ -280,7 +280,10 @@ var vidId, that = this, tmp, - container = this.container = document.getElementById( containerId ); + container = this._container = document.createElement( "div" ); + + container.id = containerId + "object"; + document.getElementById( containerId ).appendChild( container ); options = options || {}; @@ -299,8 +302,7 @@ this.previousCurrentTime = this.currentTime; this.previousVolume = this.volume; this.evtHolder = new EventManager( this ); - - this._container = document.getElementById( containerId ); + bounds = this._container.getBoundingClientRect(); // For calculating position relative to video (like subtitles) @@ -338,9 +340,9 @@ throw "No video id"; } - registry[ containerId ] = this; + registry[ container.id ] = this; - makeSwf( this, vidId, containerId ); + makeSwf( this, vidId, container.id ); // Set up listeners to internally track state as needed this.addEventListener( "load", function() { @@ -580,7 +582,7 @@ return this.evtHolder.dispatchEvent( evtName ); }, getBoundingClientRect: function() { - return this.container.getBoundingClientRect(); + return this._container.getBoundingClientRect(); }, startTimeUpdater: function() { var self = this,