Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On mobile, double click is neccesary #149

Open
bsastregx opened this issue May 2, 2023 · 8 comments
Open

On mobile, double click is neccesary #149

bsastregx opened this issue May 2, 2023 · 8 comments

Comments

@bsastregx
Copy link

bsastregx commented May 2, 2023

Hello, Greetings!

I have imported lite-youtube-embed on a component I am working on with Lit Element.
Everything is working fine, except that on mobile, I have to double click the play button to make the video work.
Do you have any idea what might be the reason?

I have created a repo for this issue. Feel free to downoad and test:

  • npm install.
  • npm start.

https://github.com/bsastregx/video-lite-embed

Thanks in advance.

@westonruter
Copy link

Which mobile browser are you testing with?

Double-tapping is a notoriously difficult problem to fix. See #6

@paul-mckibben
Copy link

I'm seeing the same thing, but only on iOS/Safari. No problem on desktop Safari, other desktop browsers, or Chrome on Android.

@kj-ivy
Copy link

kj-ivy commented Dec 15, 2023

Same issue here.
Safari, Chrome and Firefox on iPad all require a double tap for me while all desktop browsers and all browsers on Android work fine.

@amannn
Copy link

amannn commented Jan 3, 2024

The YouTube player embed disables autoplay on mobile on purpose. The way lite-youtube-embed works, is that it only displays the poster image initially and will lazy load the YouTube player embed when the user presses play. Unfortunately, on mobile the video will not autoplay when the real player has loaded, requiring another interaction.

It would be very helpful if the YouTube embed would provide a way to enable autoplay on mobile (/cc @paulirish).

@4matic
Copy link

4matic commented Jan 26, 2024

What about using jsapi on mobile devices?

@Garbee
Copy link
Contributor

Garbee commented Jan 26, 2024

It would be very helpful if the YouTube embed would provide a way to enable autoplay on mobile (/cc @paulirish).

I very much doubt they would. We need to be aware that there are still many parts of the world where data costs are high for people to consume content. If video autoplay from YT were enabled on mobile, those are the exact areas where the economic impact could end up being massive.

Imagine loading a blog post that explains something and embeds a video as a 2nd method of consumption. You just need the text but it auto-plays the video thinking it would be helpful. That one thing just started costing some people real money.

@mikeott
Copy link

mikeott commented Feb 26, 2024

I very much doubt they would. We need to be aware that there are still many parts of the world where data costs are high for people to consume content. If video autoplay from YT were enabled on mobile, those are the exact areas where the economic impact could end up being massive.

That's a very valid and important point. But in this instance, the discussion is about getting the video to autoplay on (IOS devices) when the user has already tapped the play button. When the button is clicked, that's intent, regardless of the users feelings toward bandwidth costs. @amannn didn't mean 'autoplay' to mean the video would autoplay without any interaction, he meant the video would autoplay when you tap the play button (really you could just say the video would play when you hit the button, but the parameter name is 'autoplay' - which in the context of lite-youtube-embed is admittedly a little misleading I know).

From a usability perspective it's no different to embedding a YouTube video in the traditional way, obviously except that would be worse due to the bloated scripts that method includes before you even play the video.

All that said, I too wish for the same functionality. I've tried several ways to make it work, none of them successful. It feels like we're just all doomed to standard bloated YouTube embeds for the best cross-platform compatibility :-(

@musicadi
Copy link

The problem is that most users will probably just browse away from your website if they tapped and the video doesn’t start. I wish there was a way to make this work with one tap, because I hate Youtube’s embed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants