icon_magic HTML5 Video: Magic JavaScript

Quick Jump ↵

Currently playing FLV, MP4, OGG and WebM videos

Usage
Example

The video has reached the end and the do_callback() function just fired!

Your browser can't play this video.

You can control the player via JavaScript by using links similar to those below.

Play
<a href="#" data-mjf="html5_video_play|return_false" data-mjf_h5v_video_id="magic_media_video_cont" id="magic_media_video_play">Play</a>

Pause
<a href="#" data-mjf="html5_video_pause|return_false" data-mjf_h5v_video_id="magic_media_video_cont" id="magic_media_video_pause">Pause</a>

Stop
<a href="#" data-mjf="html5_video_stop|return_false" data-mjf_h5v_video_id="magic_media_video_cont" id="magic_media_video_stop">Stop</a>

Go to 5 seconds
<a href="#" data-mjf="html5_video_seek|return_false" data-mjf_h5v_video_id="magic_media_video_cont" data-mjf_h5v_seek_time="5" id="magic_media_video_seek_5">Go to 5 seconds</a>

Go to 50 seconds
<a href="#" data-mjf="html5_video_seek|return_false" data-mjf_h5v_video_id="magic_media_video_cont" data-mjf_h5v_seek_time="50" id="magic_media_video_seek_50">Go to 50 seconds</a>

Go to the end
<a href="#" data-mjf="html5_video_end|return_false" data-mjf_h5v_video_id="magic_media_video_cont" id="magic_media_video_end">Go to the end</a>

Notes
To Do

« Back to the main documentation