mubaraqwahab / thinkdev

Think Like a Developer course website (discontinued).
https://thinkdev.netlify.app
1 stars 1 forks source link

Lite and smart youtube players #123

Closed mubaraqwahab closed 2 years ago

mubaraqwahab commented 2 years ago

Those things are heavy.

Use lite-youtube-embed so the players only load when a user actually wants to watch something.

mubaraqwahab commented 2 years ago

Not so fast... This requires a terrible double tap on mobile. See https://github.com/paulirish/lite-youtube-embed/issues/6.

I may have to do this myself 😞

mubaraqwahab commented 2 years ago

On a related note, consider doing item 2 of https://github.com/mubaraqwahab/thinkdev/issues/113#issue-1202165786 when you resolve this (i.e. Save a viewer's last timestamp and start from there the next time they load the host page.)

mubaraqwahab commented 2 years ago

Actually, trying to autoplay is unnecessary. Autoplay may not work even from the YouTube player API

Just use the no cookie url.

You can optimize by disabling the player in development. I don't want to download the whole thing every time my browser reloads in dev.

Still consider saving the player state (seek time, cc settings, etc.). (Perhaps that should be a new issue 🤔)