Communote / communote-server

Communote server with core plugins
http://communote.github.io/
Apache License 2.0
22 stars 4 forks source link

Improve embedding of videos #63

Closed rwi closed 5 years ago

rwi commented 5 years ago

Bug: Embedded videos are not responsive to available width to Improve embedding of videos When YouTube or Vimeo videos are embedded they have a fixed width and height. On smaller screens like mobile devices they might get clipped on the right. To solve this, the width of the embedded IFrame should adapt to the available width. The height should be changed accordingly by taking the aspect ratio into account.

Improvements: When fixing we could directly tackle some of the todos in the RichMediaUtils and embed the videos with a more common aspect ratio (16:9 instead of 16:10.5). Additionally, we should change to the nocookie YouTube embed URL (see Turn on privacy-enhanced mode) and prevent sending the Referrer HTTP header to YouTube and Vimeo (if the browser supports it).