justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.
https://www.npmjs.com/package/@justinribeiro/lite-youtube
MIT License
948 stars 70 forks source link

Requires 2 clicks/taps on Android Chrome/Kiwi Browser #23

Closed geekysrm closed 3 years ago

geekysrm commented 3 years ago

Using this requires 2 taps to play on Android Chrome browser and Kiwi browser(fork of Chrome).

justinribeiro commented 3 years ago

This is an side effect of the autoplay policy on mobile which prevents the flag from automatically playing the video after the first tap. This component (or any component really) can't directly control this affect.

To reduce this, you can use the autoload attr which will trigger the intersection observer to inject+load, reducing the interaction to one tap.