matt
matt

Reputation: 44293

html5 video player with simplest controls (only play and pause)

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!

Upvotes: 8

Views: 44220

Answers (3)

wonder
wonder

Reputation: 1081

You can do:

$('video').trigger('play');
$('video').trigger('pause');

For more: https://web.archive.org/web/20150411142822/http://wonderdesigners.com/?p=219

Upvotes: -4

Ian Devlin
Ian Devlin

Reputation: 18870

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.

Upvotes: 1

Silvia
Silvia

Reputation: 563

It's basically all stated here: HTML 5 video custom controls

Upvotes: 7

Related Questions