I made a retro-looking YouTube player for personal websites! It is coded fully in JavaScript, HTML, and CSS and is fully responsive for mobile devices.
The design is inspired by the audio players of the 2000s. Yes, it was made mainly for the girls, gays, and theys of indie web but anyone can use it It is also very customisable!
I’m fairly new to JavaScript, and this is also the first project that I’m sharing in this way so I would appreciate any criticism and advice.
Here’s the GitHub repo if you would like to try it
This is so cool! I love working with JS and the rest, but I’ve been too scared thus far to dip into working with YouTube, as it’s seems like it’s just too complicated to communicate with. The player looks great!
(I realise frugalgamer already said that, but it bears repeating)
I also think your readme on Github is excellent. Very well written and the little gif demonstrations are so useful. I will definitely be trying this on my site once I finish redeveloping my theme. Reminder set
Thank you so much! Not gonna lie, it was complicated at first but after a while it was easier to figure out the patterns and what needed to go where. If you ever want to try it, I’d be happy to help. The official YouTube documentation is pretty alright once you figure out what they’re saying, too XD
Thank you!! And thanks for mentioning the readme. I really wanted to make it as clear as possible and I’m wondering if it is. This makes me so happy! Please send me the link once you try the player. I would love to see it
The Retro YT player now uses IDs of YouTube videos, and offers more privacy.
Version 0.1 worked only with youtube-nocookie links because I wanted to make it more private but this also meant that it wouldn’t work with regular ones.
Thanks to the person who brought this to my attention, I reworked the code to use only video IDs and automatically play them using the official youtube-nocookie domain.
That domain insures that users’ cookies are not sent to YouTube when a video embedded on a website starts playing. By doing this, playing music on your website becomes more secure for the people who visit it. YouTube still collects some user data but way less than with regular YouTube links.
I’m sorry if you’ve tried to use the player and it did not work. Even before this update, I tried forcing it to play videos over the nocookie domain, which caused regular links to not be recognised. As I’m new to the YouTube API, I didn’t know this. Now everything should work as intended, with some additional privacy :3
If you use the player, you can message me here, e-mail me, or reply to this topic. I’d love to see it used. If you have issues with it, please let me know. I’d love to help you fix them, and it will allow me to further improve the code :3