How to Build Video Player with Custom Controls

Submitted by: 
Language: 
Visitors have accessed this post 647 times.

If you are looking for a simple Video Player with Custom Controls then you are at the right place. We are going to create simple video player to embed video into the webpage. We can easily to implement the video player in the web page using the HTML5. All we need is the <video> element in HTML5, we don’t need to used any jQuery plugin or flash to create a video player in the web page.

You can also check the live demo of this simple tutorial, so you can get an idea and you can try this out, let's start coding.

This example HTML code below, it displays a simple video player in a web page.

  1. <video width="520" height="250" controls>
  2. <source src="video/video.mp4" type="video/mp4">
  3. </video>

And, we have a video player with custom controls below. Kindly check the source code below.

  1. <video id="video-Player" width="500">
  2. <source src="video/video.mp4" type="video/mp4">
  3. </video>
  4.  
  5. <br />
  6. <br />
  7.  
  8. <button class="btn-style" onclick="Play_Pause()">Play/Pause</button>
  9. <button class="btn-style" onclick="Reload()">Reload</button>
  10. <button class="btn-style" onclick="Large_Screen()">Large</button>
  11. <button class="btn-style" onclick="Small_Screen()">Small</button>
  12. <button class="btn-style" onclick="Normal_Screen()">Normal</button>

In the source code above, we have Play and/or Pause button, Reload Button, for the Large Screen Button, Small Screen Button, and Normal Screen Button. These are the custom controls in the video player created using HTML5.

Output

Result

For the full source code, kindly click the "Download Code" button below.

Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.