Video player
Video Player Html Source Code
you can use this code for making a simple video player
- <html>
- <head>
- <title>Video Player with Download</title>
- <style>
- /* Your existing styles here */
- </style>
- </head>
- <body>
- <h1>Video Player with Download</h1>
- <div class="container">
- <video controls="" id="videoPlayer">
- <source src="https://www.youtube.com/" type="video/mp4"></source>
- Your browser does not support the video tag.
- </video>
- <button onclick="downloadVideo()">Download Video</button>
- </div>
- <script>
- function downloadVideo() {
- var videoPlayer = document.getElementById("videoPlayer");
- var videoSource = videoPlayer.getElementsByTagName("source")[0].src;
- window.location.href = videoSource;
- }
- </script>
- </body>
- </html>
Heres this output result


No comments
Post a Comment