Tip: If the video isn't playing or appears blank, try pasting a new link and clicking 'Play Video' again.
Welcome to the Simple YouTube Video Player!
This guide will help you understand and use this single-file web application.
How to Use:
Open this `youtube.html` file in your web browser. (You can simply double-click it, or drag it into your browser tab).
Paste a YouTube Link:
Find a YouTube video you want to watch.
Copy its URL from your browser's address bar (e.g., `https://www.youtube.com/watch?v=dQw4w9WgXcQ` or `https://youtu.be/dQw4w9WgXcQ`).
Paste this link into the text box labeled "Paste YouTube link here".
Play the Video:
Click the "Play Video" button. The video should load and start playing below the input field.
Adjust Player Size:
Use the slider labeled "Adjust Video Player Size" to dynamically change how wide the video player appears on your screen.
Toggle Dark Mode:
In the top-right corner, you'll see a circular button with a moon or sun icon. Click this button to switch between light and dark themes. Your theme preference will be saved for your next visit!
Troubleshooting:
"Invalid YouTube URL" error: Ensure you've copied the full and correct URL for a YouTube video. It supports regular `watch?v=` links and `youtu.be` shortened links.
"Video took too long to load" error: Check your internet connection. Sometimes, videos might be restricted from embedding by their uploader.
Player not responding: Try refreshing the page (F5 or Ctrl+R/Cmd+R).