_renderVideo = _renderVideo || {}

_renderVideo.vimeo = function _renderVideoVimeo (parent, options) {
  var player_id = options.id + (new Date()).getTime()
  var params = {
    loop: options.loop,
    title: 0,
    badge: 0,
    byline: 0,
    portrait: 0,
    api: 1,
    player_id: player_id
  }
  var vimeoElem = Object.create(VimeoElem)
  vimeoElem.setOptions({
    url:
      [
        '//player.vimeo.com/video/',
        options.id,
        uriEncodeObj(params)
      ].join(''),
    player_id: player_id,
    parent: parent,
    ratio: options.aspectRatio,
    volume: options.volume,
    autoSize: true
  })
  vimeoElem.initializeElem()
}


var VimeoElem = {
  setOptions: function setOptions (options) {
    _.extend(this, options)
  },

  initializeElem: function () {
    var self = this
    self.renderHTML()
    if(self.autoSize) {
      self.updateStyles()
      addEventListener('resize', self.updateStyles.bind(self))
    }
    self.parent.appendChild(self.elem)
    self.elem.addEventListener('load', function () {
      self.callAPI('setVolume', self.volume)
      self.callAPI('play')
    })
  },

  renderHTML: function createVimeoElement () {
    this.elem = document.createElement('iframe')
    this.elem.src = this.url
    this.elem.className = 'videobackground__frame'
    this.elem.setAttribute('frameborder', 0)
    this.elem.id = this.player_id
  },

  setSize: function setSize () {
    if(
      this.parent.clientWidth / this.ratio >
      this.parent.clientHeight
    ) {
      this.width = this.parent.clientWidth
      this.height = this.parent.clientWidth / this.ratio
    } else {
      this.width = this.parent.clientHeight * this.ratio
      this.height = this.parent.clientHeight
    }
  },

  updateStyles: function updateStyles () {
    this.setSize()
    this.elem.width = this.width + 'px'
    this.elem.height = this.height + 'px'
    this.elem.style.marginLeft = ['-', 'px'].join(Math.round(this.width / 2))
    this.elem.style.marginTop = ['-', 'px'].join(Math.round(this.height / 2))
  },

  callAPI: function callAPI (method, value) {
    this.elem.contentWindow.postMessage(JSON.stringify({
      method: method,
      value: value
    }), '*')
  }
}

@@ -1112,16 +1112,39 @@
 )%0A  %7D,%0A%0A
+  controlsHeight: 54,%0A%0A
   render
@@ -1178,24 +1178,24 @@
 lement () %7B%0A
-
     this.ele
@@ -1425,24 +1425,94 @@
 etSize () %7B%0A
+    var clientHeight = this.parent.clientHeight + this.controlsHeight%0A
     if(%0A    
@@ -1554,36 +1554,24 @@
 tio %3E%0A      
-this.parent.
 clientHeight
@@ -1707,36 +1707,24 @@
 his.width = 
-this.parent.
 clientHeight
@@ -1753,36 +1753,24 @@
 is.height = 
-this.parent.
 clientHeight
@@ -2060,24 +2060,25 @@
 (Math.round(
+(
 this.height 
@@ -2076,16 +2076,39 @@
 s.height
+ - this.controlsHeight)
  / 2))%0A 

cut off the controls