]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#t486] generating container div for vimeo object
authorScottDowne <sdowne@learn.senecac.on.ca>
Wed, 11 May 2011 20:22:59 +0000 (16:22 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Wed, 11 May 2011 20:22:59 +0000 (16:22 -0400)
players/vimeo/popcorn.vimeo.js

index d2c3b266245cfbc0513ffca24d455df348168794..1a481ccbe54a92b73a532b5166f8a01a884fb9bd 100644 (file)
       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 || {};
       
       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)
         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() {
       return this.evtHolder.dispatchEvent( evtName );
     },
     getBoundingClientRect: function() {
-      return this.container.getBoundingClientRect();
+      return this._container.getBoundingClientRect();
     },
     startTimeUpdater: function() {
       var self = this,