Plyr: Possible to add allow="autoplay" to iframe for youTube & Vimeo?

Created on 9 Jan 2018  路  2Comments  路  Source: sampotts/plyr

Expected behaviour

When a page is allowed to use autoplay for videos YouTube & Vimeo videos should autoplay too according to the new rules for Chrome: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

Actual behaviour

On the latest Chrome dev player.play() commands for youTube & Vimeo are ignored

Environment

  • Browser: Chrome
  • Version: 65.0.3311.3
  • Operating System: Windows
  • Version: 10

Players affected:

  • [ ] HTML5 Video
  • [ ] HTML5 Audio
  • [X] YouTube
  • [X] Vimeo

Steps to reproduce

  • Use Chrome dev
  • try a plyr-page with autostart enabled for a youTube/Vimeo video

Relevant links

To fix it plyr needs to add to the iframe-tag for youTube/Vimeo the 'allow="autoplay"' parameter (on youTube extending the existing allow parameter), see:
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

Fixed in V3 Improvement

Most helpful comment

This is fixed in v3 but only for Vimeo as YouTube creates their own frame so we have little control over it.

All 2 comments

This is fixed in v3 but only for Vimeo as YouTube creates their own frame so we have little control over it.

Closing this one for now. v3 will be merged to master soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Generalomosco picture Generalomosco  路  3Comments

michaelmano picture michaelmano  路  3Comments

tomByrer picture tomByrer  路  3Comments

elliottcoe picture elliottcoe  路  4Comments

ahmadshc picture ahmadshc  路  4Comments