{"id":3702,"date":"2022-10-08T14:02:58","date_gmt":"2022-10-08T09:02:58","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=3702"},"modified":"2022-10-08T14:03:01","modified_gmt":"2022-10-08T09:03:01","slug":"make-a-custom-video-player-using-html5-css3-javascript","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/","title":{"rendered":"Make a Custom Video Player using HTML5, CSS3 &#038; JavaScript"},"content":{"rendered":"\n<p>In this tutorial, I will teach you\u00a0<strong>how to create a Custom Video Player<\/strong>\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript Custom Video Player is given below.<\/p>\n\n\n\n<p>You can download the full source code (including a sample video) of this <strong>JavaScript Custom Video Player<\/strong> at the end of this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML, CSS &amp; JavaScript Custom Video Player Source Code<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">index.html<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;\n  &lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;Custom Video Player JavaScript&lt;\/title&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n    &lt;!-- These 3 links are only for icons --&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.1.1\/css\/all.min.css&quot;&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/fonts.googleapis.com\/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&quot; \/&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/fonts.googleapis.com\/icon?family=Material+Icons&quot;&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;div class=&quot;container show-controls&quot;&gt;\n        &lt;div class=&quot;wrapper&quot;&gt;\n            &lt;div class=&quot;video-timeline&quot;&gt;\n                &lt;div class=&quot;progress-area&quot;&gt;\n                    &lt;span&gt;00:00&lt;\/span&gt;\n                    &lt;div class=&quot;progress-bar&quot;&gt;&lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n            &lt;ul class=&quot;video-controls&quot;&gt;\n                &lt;li class=&quot;options left&quot;&gt;\n                    &lt;button class=&quot;volume&quot;&gt;&lt;i class=&quot;fa-solid fa-volume-high&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n                    &lt;input type=&quot;range&quot; min=&quot;0&quot; max=&quot;1&quot; step=&quot;any&quot;&gt;\n                    &lt;div class=&quot;video-timer&quot;&gt;\n                        &lt;p class=&quot;current-time&quot;&gt;00:00&lt;\/p&gt;\n                        &lt;p class=&quot;separator&quot;&gt; \/ &lt;\/p&gt;\n                        &lt;p class=&quot;video-duration&quot;&gt;00:00&lt;\/p&gt;\n                    &lt;\/div&gt;\n                &lt;\/li&gt;\n                &lt;li class=&quot;options center&quot;&gt;\n                    &lt;button class=&quot;skip-backward&quot;&gt;&lt;i class=&quot;fas fa-backward&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n                    &lt;button class=&quot;play-pause&quot;&gt;&lt;i class=&quot;fas fa-play&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n                    &lt;button class=&quot;skip-forward&quot;&gt;&lt;i class=&quot;fas fa-forward&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n                &lt;\/li&gt;\n                &lt;li class=&quot;options right&quot;&gt;\n                    &lt;div class=&quot;playback-content&quot;&gt;\n                        &lt;button class=&quot;playback-speed&quot;&gt;&lt;span class=&quot;material-symbols-rounded&quot;&gt;slow_motion_video&lt;\/span&gt;&lt;\/button&gt;\n                        &lt;ul class=&quot;speed-options&quot;&gt;\n                            &lt;li data-speed=&quot;2&quot;&gt;2x&lt;\/li&gt;\n                            &lt;li data-speed=&quot;1.5&quot;&gt;1.5x&lt;\/li&gt;\n                            &lt;li data-speed=&quot;1&quot; class=&quot;active&quot;&gt;Normal&lt;\/li&gt;\n                            &lt;li data-speed=&quot;0.75&quot;&gt;0.75x&lt;\/li&gt;\n                            &lt;li data-speed=&quot;0.5&quot;&gt;0.5x&lt;\/li&gt;\n                        &lt;\/ul&gt;\n                    &lt;\/div&gt;\n                    &lt;button class=&quot;pic-in-pic&quot;&gt;&lt;span class=&quot;material-icons&quot;&gt;picture_in_picture_alt&lt;\/span&gt;&lt;\/button&gt;\n                    &lt;button class=&quot;fullscreen&quot;&gt;&lt;i class=&quot;fa-solid fa-expand&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n                &lt;\/li&gt;\n            &lt;\/ul&gt;\n        &lt;\/div&gt;\n        &lt;video src=&quot;demo-video.mp4&quot;&gt;&lt;\/video&gt;\n    &lt;\/div&gt;\n\n    &lt;script src=&quot;script.js&quot;&gt;&lt;\/script&gt;\n\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">script.js<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">const container = document.querySelector(&quot;.container&quot;),\nmainVideo = container.querySelector(&quot;video&quot;),\nvideoTimeline = container.querySelector(&quot;.video-timeline&quot;),\nprogressBar = container.querySelector(&quot;.progress-bar&quot;),\nvolumeBtn = container.querySelector(&quot;.volume i&quot;),\nvolumeSlider = container.querySelector(&quot;.left input&quot;);\ncurrentVidTime = container.querySelector(&quot;.current-time&quot;),\nvideoDuration = container.querySelector(&quot;.video-duration&quot;),\nskipBackward = container.querySelector(&quot;.skip-backward i&quot;),\nskipForward = container.querySelector(&quot;.skip-forward i&quot;),\nplayPauseBtn = container.querySelector(&quot;.play-pause i&quot;),\nspeedBtn = container.querySelector(&quot;.playback-speed span&quot;),\nspeedOptions = container.querySelector(&quot;.speed-options&quot;),\npipBtn = container.querySelector(&quot;.pic-in-pic span&quot;),\nfullScreenBtn = container.querySelector(&quot;.fullscreen i&quot;);\nlet timer;\n\nconst hideControls = () =&gt; {\n    if(mainVideo.paused) return;\n    timer = setTimeout(() =&gt; {\n        container.classList.remove(&quot;show-controls&quot;);\n    }, 3000);\n}\nhideControls();\n\ncontainer.addEventListener(&quot;mousemove&quot;, () =&gt; {\n    container.classList.add(&quot;show-controls&quot;);\n    clearTimeout(timer);\n    hideControls();   \n});\n\nconst formatTime = time =&gt; {\n    let seconds = Math.floor(time % 60),\n    minutes = Math.floor(time \/ 60) % 60,\n    hours = Math.floor(time \/ 3600);\n\n    seconds = seconds &lt; 10 ? `0${seconds}` : seconds;\n    minutes = minutes &lt; 10 ? `0${minutes}` : minutes;\n    hours = hours &lt; 10 ? `0${hours}` : hours;\n\n    if(hours == 0) {\n        return `${minutes}:${seconds}`\n    }\n    return `${hours}:${minutes}:${seconds}`;\n}\n\nvideoTimeline.addEventListener(&quot;mousemove&quot;, e =&gt; {\n    let timelineWidth = videoTimeline.clientWidth;\n    let offsetX = e.offsetX;\n    let percent = Math.floor((offsetX \/ timelineWidth) * mainVideo.duration);\n    const progressTime = videoTimeline.querySelector(&quot;span&quot;);\n    offsetX = offsetX &lt; 20 ? 20 : (offsetX &gt; timelineWidth - 20) ? timelineWidth - 20 : offsetX;\n    progressTime.style.left = `${offsetX}px`;\n    progressTime.innerText = formatTime(percent);\n});\n\nvideoTimeline.addEventListener(&quot;click&quot;, e =&gt; {\n    let timelineWidth = videoTimeline.clientWidth;\n    mainVideo.currentTime = (e.offsetX \/ timelineWidth) * mainVideo.duration;\n});\n\nmainVideo.addEventListener(&quot;timeupdate&quot;, e =&gt; {\n    let {currentTime, duration} = e.target;\n    let percent = (currentTime \/ duration) * 100;\n    progressBar.style.width = `${percent}%`;\n    currentVidTime.innerText = formatTime(currentTime);\n});\n\nmainVideo.addEventListener(&quot;loadeddata&quot;, () =&gt; {\n    videoDuration.innerText = formatTime(mainVideo.duration);\n});\n\nconst draggableProgressBar = e =&gt; {\n    let timelineWidth = videoTimeline.clientWidth;\n    progressBar.style.width = `${e.offsetX}px`;\n    mainVideo.currentTime = (e.offsetX \/ timelineWidth) * mainVideo.duration;\n    currentVidTime.innerText = formatTime(mainVideo.currentTime);\n}\n\nvolumeBtn.addEventListener(&quot;click&quot;, () =&gt; {\n    if(!volumeBtn.classList.contains(&quot;fa-volume-high&quot;)) {\n        mainVideo.volume = 0.5;\n        volumeBtn.classList.replace(&quot;fa-volume-xmark&quot;, &quot;fa-volume-high&quot;);\n    } else {\n        mainVideo.volume = 0.0;\n        volumeBtn.classList.replace(&quot;fa-volume-high&quot;, &quot;fa-volume-xmark&quot;);\n    }\n    volumeSlider.value = mainVideo.volume;\n});\n\nvolumeSlider.addEventListener(&quot;input&quot;, e =&gt; {\n    mainVideo.volume = e.target.value;\n    if(e.target.value == 0) {\n        return volumeBtn.classList.replace(&quot;fa-volume-high&quot;, &quot;fa-volume-xmark&quot;);\n    }\n    volumeBtn.classList.replace(&quot;fa-volume-xmark&quot;, &quot;fa-volume-high&quot;);\n});\n\nspeedOptions.querySelectorAll(&quot;li&quot;).forEach(option =&gt; {\n    option.addEventListener(&quot;click&quot;, () =&gt; {\n        mainVideo.playbackRate = option.dataset.speed;\n        speedOptions.querySelector(&quot;.active&quot;).classList.remove(&quot;active&quot;);\n        option.classList.add(&quot;active&quot;);\n    });\n});\n\ndocument.addEventListener(&quot;click&quot;, e =&gt; {\n    if(e.target.tagName !== &quot;SPAN&quot; || e.target.className !== &quot;material-symbols-rounded&quot;) {\n        speedOptions.classList.remove(&quot;show&quot;);\n    }\n});\n\nfullScreenBtn.addEventListener(&quot;click&quot;, () =&gt; {\n    container.classList.toggle(&quot;fullscreen&quot;);\n    if(document.fullscreenElement) {\n        fullScreenBtn.classList.replace(&quot;fa-compress&quot;, &quot;fa-expand&quot;);\n        return document.exitFullscreen();\n    }\n    fullScreenBtn.classList.replace(&quot;fa-expand&quot;, &quot;fa-compress&quot;);\n    container.requestFullscreen();\n});\n\nspeedBtn.addEventListener(&quot;click&quot;, () =&gt; speedOptions.classList.toggle(&quot;show&quot;));\npipBtn.addEventListener(&quot;click&quot;, () =&gt; mainVideo.requestPictureInPicture());\nskipBackward.addEventListener(&quot;click&quot;, () =&gt; mainVideo.currentTime -= 5);\nskipForward.addEventListener(&quot;click&quot;, () =&gt; mainVideo.currentTime += 5);\nmainVideo.addEventListener(&quot;play&quot;, () =&gt; playPauseBtn.classList.replace(&quot;fa-play&quot;, &quot;fa-pause&quot;));\nmainVideo.addEventListener(&quot;pause&quot;, () =&gt; playPauseBtn.classList.replace(&quot;fa-pause&quot;, &quot;fa-play&quot;));\nplayPauseBtn.addEventListener(&quot;click&quot;, () =&gt; mainVideo.paused ? mainVideo.play() : mainVideo.pause());\nvideoTimeline.addEventListener(&quot;mousedown&quot;, () =&gt; videoTimeline.addEventListener(&quot;mousemove&quot;, draggableProgressBar));\ndocument.addEventListener(&quot;mouseup&quot;, () =&gt; videoTimeline.removeEventListener(&quot;mousemove&quot;, draggableProgressBar));<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">style.css<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">\/* Import Google font - Poppins *\/\n@import url('https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600&amp;display=swap');\n*{\n  margin: 0;\n  padding: 0;\n  box-sizing: border-box;\n  font-family: 'Poppins', sans-serif;\n}\nbody{\n  min-height: 100vh;\n  background: #E3F2FD;\n}\nbody, .container, .video-controls, .video-timer, .options{\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.container{\n  width: 98%;\n  user-select: none;\n  overflow: hidden;\n  max-width: 900px;\n  border-radius: 5px;\n  background: #000;\n  aspect-ratio: 16 \/ 9;\n  position: relative;\n  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);\n}\n.container.fullscreen{\n  max-width: 100%;\n  width: 100%;\n  height: 100vh;\n  border-radius: 0px;\n}\n.wrapper{\n  position: absolute;\n  left: 0;\n  right: 0;\n  z-index: 1;\n  opacity: 0;\n  bottom: -15px;\n  transition: all 0.08s ease;\n}\n.container.show-controls .wrapper{\n  opacity: 1;\n  bottom: 0;\n  transition: all 0.13s ease;\n}\n.wrapper::before{\n  content: &quot;&quot;;\n  bottom: 0;\n  width: 100%;\n  z-index: -1;\n  position: absolute;\n  height: calc(100% + 35px);\n  pointer-events: none;\n  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);\n}\n.video-timeline{\n  height: 7px;\n  width: 100%;\n  cursor: pointer;\n}\n.video-timeline .progress-area{\n  height: 3px;\n  position: relative;\n  background: rgba(255, 255, 255, 0.6);\n}\n.progress-area span{\n  position: absolute;\n  left: 50%;\n  top: -25px;\n  font-size: 13px;\n  color: #fff;\n  pointer-events: none;\n  transform: translateX(-50%);\n}\n.progress-area .progress-bar{\n  width: 0%;\n  height: 100%;\n  position: relative;\n  background: #2289ff;\n}\n.progress-bar::before{\n  content: &quot;&quot;;\n  right: 0;\n  top: 50%;\n  height: 13px;\n  width: 13px;\n  position: absolute;\n  border-radius: 50%;\n  background: #2289ff;\n  transform: translateY(-50%);\n}\n.progress-bar::before, .progress-area span{\n  display: none;\n}\n.video-timeline:hover .progress-bar::before,\n.video-timeline:hover .progress-area span{\n  display: block;\n}\n.wrapper .video-controls{\n  padding: 5px 20px 10px;\n}\n.video-controls .options{\n  width: 100%;\n}\n.video-controls .options:first-child{\n  justify-content: flex-start;\n}\n.video-controls .options:last-child{\n  justify-content: flex-end;\n}\n.options button{\n  height: 40px;\n  width: 40px;\n  font-size: 19px;\n  border: none;\n  cursor: pointer;\n  background: none;\n  color: #efefef;\n  border-radius: 3px;\n  transition: all 0.3s ease;\n}\n.options button :where(i, span) {\n  height: 100%;\n  width: 100%;\n  line-height: 40px;\n}\n.options button:hover :where(i, span){\n  color: #fff;\n}\n.options button:active :where(i, span){\n  transform: scale(0.9);\n}\n.options button span{\n  font-size: 23px;\n}\n.options input{\n  height: 4px;\n  margin-left: 3px;\n  max-width: 75px;\n  accent-color: #0078FF;\n}\n.options .video-timer{\n  color: #efefef;\n  margin-left: 15px;\n  font-size: 14px;\n}\n.video-timer .separator{\n  margin: 0 5px;\n  font-size: 16px;\n  font-family: &quot;Open sans&quot;;\n}\n.playback-content{\n  display: flex;\n  position: relative;\n}\n.playback-content .speed-options{\n  position: absolute;\n  list-style: none;\n  left: -40px;\n  bottom: 40px;\n  width: 95px;\n  overflow: hidden;\n  opacity: 0;\n  border-radius: 4px;\n  pointer-events: none;\n  background: rgba(255, 255, 255, 0.9);\n  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);\n  transition: opacity 0.13s ease;\n}\n.playback-content .speed-options.show{\n  opacity: 1;\n  pointer-events: auto;\n}\n.speed-options li{\n  cursor: pointer;\n  color: #000;\n  font-size: 14px;\n  margin: 2px 0;\n  padding: 5px 0 5px 15px;\n  transition: all 0.1s ease;\n}\n.speed-options li:where(:first-child, :last-child){\n  margin: 0px;\n}\n.speed-options li:hover{\n  background: #dfdfdf;\n}\n.speed-options li.active{\n  color: #fff;\n  background: #3e97fd;\n}\n.container video{\n  width: 100%;\n}\n\n@media screen and (max-width: 540px) {\n  .wrapper .video-controls{\n    padding: 3px 10px 7px;\n  }\n  .options input, .progress-area span{\n    display: none!important;\n  }\n  .options button{\n    height: 30px;\n    width: 30px;\n    font-size: 17px;\n  }\n  .options .video-timer{\n    margin-left: 5px;\n  }\n  .video-timer .separator{\n    font-size: 14px;\n    margin: 0 2px;\n  }\n  .options button :where(i, span) {\n    line-height: 30px;\n  }\n  .options button span{\n    font-size: 21px;\n  }\n  .options .video-timer, .progress-area span, .speed-options li{\n    font-size: 12px;\n  }\n  .playback-content .speed-options{\n    width: 75px;\n    left: -30px;\n    bottom: 30px;\n  }\n  .speed-options li{\n    margin: 1px 0;\n    padding: 3px 0 3px 10px;\n  }\n  .right .pic-in-pic{\n    display: none;\n  }\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Download Source Code (including a sample video)<\/h2>\n\n\n\n<p><strong>Important Note:<\/strong> The size of the sample video file is 113 MB because of its high quality. So, please be patient while downloading this source code.<\/p>\n\n\n<p><a class=\"ep_link_major\" href=\"https:\/\/edopedia.com\/assets\/downloads\/static\/javascript_custom_video_player.zip\" target=\"_blank\" rel=\"noopener\" download=\"\">Download<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript Custom Video Player is given below. You can download the full source code (including a sample video) of this JavaScript Custom Video Player at the end of this article. HTML, CSS &#8230; <a title=\"Make a Custom Video Player using HTML5, CSS3 &#038; JavaScript\" class=\"read-more\" href=\"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/\" aria-label=\"Read more about Make a Custom Video Player using HTML5, CSS3 &#038; JavaScript\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":3704,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-3702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Make a Custom Video Player using HTML5, CSS3 &amp; JavaScript<\/title>\n<meta name=\"description\" content=\"In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Make a Custom Video Player using HTML5, CSS3 &amp; JavaScript\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-08T09:02:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-08T09:03:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"880\" \/>\n\t<meta property=\"og:image:height\" content=\"495\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Furqan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Furqan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Make a Custom Video Player using HTML5, CSS3 & JavaScript","description":"In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Make a Custom Video Player using HTML5, CSS3 & JavaScript","og_description":"In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","og_url":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-10-08T09:02:58+00:00","article_modified_time":"2022-10-08T09:03:01+00:00","og_image":[{"width":880,"height":495,"url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg","type":"image\/jpeg"}],"author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Make a Custom Video Player using HTML5, CSS3 &#038; JavaScript","datePublished":"2022-10-08T09:02:58+00:00","dateModified":"2022-10-08T09:03:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/"},"wordCount":112,"commentCount":2,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/","url":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/","name":"Make a Custom Video Player using HTML5, CSS3 & JavaScript","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg","datePublished":"2022-10-08T09:02:58+00:00","dateModified":"2022-10-08T09:03:01+00:00","description":"In this tutorial, I will teach you\u00a0how to create a Custom Video Player\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Custom-Video-Player-in-HTML-CSS-JavaScript-Custom-Video-Player-in-JavaScript.jpg","width":880,"height":495,"caption":"Make a Custom Video Player using HTML5, CSS3 & JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/make-a-custom-video-player-using-html5-css3-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Make a Custom Video Player using HTML5, CSS3 &#038; JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/www.edopedia.com\/blog\/#website","url":"https:\/\/www.edopedia.com\/blog\/","name":"Edopedia","description":"Coding\/Programming Blog","publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edopedia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.edopedia.com\/blog\/#organization","name":"Edopedia","url":"https:\/\/www.edopedia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","width":400,"height":100,"caption":"Edopedia"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339","name":"Furqan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","caption":"Furqan"},"description":"Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.","sameAs":["http:\/\/www.edopedia.com\/blog\/","trulyfurqan"],"url":"https:\/\/www.edopedia.com\/blog\/author\/furqan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/comments?post=3702"}],"version-history":[{"count":1,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3702\/revisions"}],"predecessor-version":[{"id":3703,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3702\/revisions\/3703"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/3704"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=3702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=3702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=3702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}