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

does not work on mobile #163

Closed
i1li opened this issue Feb 21, 2024 · 2 comments
Closed

does not work on mobile #163

i1li opened this issue Feb 21, 2024 · 2 comments

Comments

@i1li
Copy link

i1li commented Feb 21, 2024

it just loads the thumbnail and no video on mobile

edit: fixed https://github.com/i1li/lightest-youtube-embed

@page200
Copy link

page200 commented Mar 1, 2024

Have you tried tapping on the thumbnail twice as per #149?

Does https://github.com/i1li/lightest-youtube-embed perform well in a comparison like this one?

@i1li
Copy link
Author

i1li commented Mar 2, 2024

I just went back and looked at the deploy where this happened, it was actually caused by CSP blocking youtube.com/iframe_api (“script-src”), because I only had youtube-nocookie.com added to the CSP. My fault, but i'll leave this in case someone else is searching with that problem.

The comparison with thumbnail loading is going to be the same, but lightest-youtube-embed eliminates the need for thumbnails, enabling an infinite amount of embeds on a page with no connections at all until clicked. With autoplay turned on there is no thumbnail loaded even after the user clicks to show the video. Ultimately I was less concerned about thumbnails and more about removing the need for the Youtube API altogether. lightest-youtube-embed enables more dynamic placement, including embeds to be inline along text in a paragraph just like a hyperlink. its also more responsive than lite-youtube-embed, and in under 100 lines of code total.

I appreciate Paul sharing his work, and the similar projects, like lazyframe. i'll look at making a companion script that fetches and saves titles and thumbnails locally once, as a final way to minimize all unnecessary user connections

@i1li i1li closed this as completed Mar 2, 2024
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

2 participants