Somehow, there are really little tutorials out there for html5 video and audio playback.
I simply want to embed video and audio files with customized controls. However, the controls should be fairly simple. I only need a play-button. If clicked, play gets replaced by pause. That's all!
However, I even don't know how to embed/display a video without “preload controls”. Somehow, if I only set (without preload controls) Firefox doesn't even show anything. Chrome does show a black window.
I would love to be able to use jQuery to control the video play and pause button. Maybe you have some little start-approach for me!
Thank you very much!
Complete code for Play and Pause button for HTML5 video After you play the video by clicking play button the “Play” text will immediately change into “Pause” text and after you click on pause it will again be “Play”. All these will be done by the addEventListener function of JavaScript.
We can hide the controls by not adding the controls attribute to the video element. Even without controls attribute on the elements the user can view the controls section by right-clicking on the video and enabling the show controls .
It's basically all stated here: HTML 5 video custom controls
There's an article co-written by one of the authors (Bruce Lawson) of the above article which, if you scroll down to, shows you how to create your own controls: Introduction to HTML5 video.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With