The ever-changing rules about autoplay

Lazyweb: I wish to have an HREF that, when clicked, creates a new 16:9 window with a YouTube IFRAME in it, which then begins playing, with audio.

My understanding was that the current crop of what we generously call "browsers" follow the rule that things can only "auto" play in response to a user's click. Fine. That is exactly what I'm trying to do.

So... how?

Please show me a working example.

Note that I am trying to make this happen on desktop. I will want a similar thing on mobile too, but I understand that the situation there is probably fucked in a completely different way.

(Also lemme know if this or this are doing something dumb on your browser, besides not playing the first time you click on things.)

Previously, previously.

Tags: , , , ,

13 Responses:

  1. Jeff Hobbs says:

    We do this on the site We use the IFrame JS api. It's over-engineered, like all of Google's APIs, but it will do what you outline above.

  2. Dan says:

    The mixtapes link seemed to work like you described. I clicked the link and went to the mixtapes page. I clicked on "jwz mixtape 2Ø1". A 16:9 window popped up and began playing the videos with audio.

    The webcasts page also pops up a window that plays the video stream when I click on the webcast link.

    This is on a Windows 10 desktop with Chrome.

  3. allan says:

    both links work as Dan describes on Debian stretch using firefox 60.4esr

  4. Crappo says:

    Both links do what you describe in Chrome on Ubuntu 16.04.

    • XuppdduX says:

      Androd7.1.1 -Chrome(59.0.3071125-mobile) Thing1-"Media blackback was aborted ... browser did not support -autoplays Thing2 /not a GooglePlay user.Waterfox 56moble Thing1-spinner spins,Thing2-works. May need update ...

  5. jwz says:

    Ok, well, maybe it's just Safari that's being an asshole?

    So why is Safari being an asshole?

  • Previously