Revision 3e750004 cloudcms/static/cloudcms/js/youtube.js

b/cloudcms/static/cloudcms/js/youtube.js
10 10
  var self = this;
11 11
  
12 12
  this.player =  new YT.Player(this.videoEl[0], {
13
    height: self.currheight,
14
    width: self.currwidth,
13
    height: '100%',
14
    width: '100%',
15 15
    playerVars: { 'modestbranding':1},
16 16
    videoId: options.youtube_id, 
17 17
    events: {
......
22 22
      }
23 23
    },
24 24
  })
25
  console.log(this.player);
26
 // this.player.setPlaybackQuality('hd1080');
25
  
26
  $(window).resize(_.bind(function() { 
27
    if (this.close.css('visibility') == 'hidden' ) {
28
      this.wrapper.css('height', '282px' );
29
    } else {
30
      this.currwidth = this.wrapper.width();
31
      this.currheight = parseInt(458* (this.currwidth/816));
32
      this.wrapper.css('height',this.currheight)
33
    }
34
    
35
  }, this));
27 36

  
28 37
  this.initEvents();
29 38

  
......
47 56
  });
48 57
  this.close.click(function(e){
49 58
    e.preventDefault();
59
    self.player.stopVideo(); 
50 60
    self.endEvents();
51 61
  })
52 62
}

Also available in: Unified diff