     else
       fullScreenButton.innerHTML = 'fullscreen'
       fullScreenButton.dataset.status = 'false'
+      setTimeout(resizeContainer, 10)
     return
 
   document.onmozfullscreenchange = ->

    else
      fullScreenButton.innerHTML = 'fullscreen'
      fullScreenButton.dataset.status = 'false'
    return

  # Event listeners for the seek bar

    else
      fullScreenButton.innerHTML = 'fullscreen'
      fullScreenButton.dataset.status = 'false'
      # brute force patch: apparently, after exiting fullscreen mode,
      # window.onresize is triggered twice(!), the second time with incorrect
      # window height data, which results in a video area not quite filling
      # the whole window. The next line resizes the container again.
      setTimeout(resizeContainer, 10)
    return

  document.onwebkitfullscreenchange = ->
