2010-05-18 05:51:17 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title>HTML5 Video Player</title>
|
2010-06-03 08:03:03 +03:00
|
|
|
|
|
|
|
<!-- Include the VideoJS Library -->
|
2010-05-18 05:51:17 +03:00
|
|
|
<script src="video.js" type="text/javascript" charset="utf-8"></script>
|
2010-06-03 08:03:03 +03:00
|
|
|
|
2010-09-26 08:28:04 +03:00
|
|
|
<script type="text/javascript">
|
2010-08-06 20:19:23 +03:00
|
|
|
// Must come after the video.js library
|
2010-05-18 07:25:32 +03:00
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
// Add VideoJS to all video tags on the page when the DOM is ready
|
|
|
|
VideoJS.setupAllWhenReady();
|
2010-06-09 11:24:12 +03:00
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
/* ============= OR ============ */
|
2010-06-09 11:24:12 +03:00
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
// Setup and store a reference to the player(s).
|
2010-08-06 20:19:23 +03:00
|
|
|
// Must happen after the DOM is loaded
|
2010-08-20 07:33:30 +03:00
|
|
|
// You can use any library's DOM Ready method instead of VideoJS.DOMReady
|
|
|
|
|
2010-08-06 20:19:23 +03:00
|
|
|
/*
|
|
|
|
VideoJS.DOMReady(function(){
|
2010-08-20 07:33:30 +03:00
|
|
|
|
|
|
|
// Using the video's ID or element
|
|
|
|
var myPlayer = VideoJS.setup("example_video_1");
|
|
|
|
|
|
|
|
// OR using an array of video elements/IDs
|
|
|
|
// Note: It returns an array of players
|
|
|
|
var myManyPlayers = VideoJS.setup(["example_video_1", "example_video_2", video3Element]);
|
|
|
|
|
|
|
|
// OR all videos on the page
|
|
|
|
var myManyPlayers = VideoJS.setup("All");
|
2010-08-06 20:19:23 +03:00
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
// After you have references to your players you can...(example)
|
|
|
|
myPlayer.play(); // Starts playing the video for this player.
|
2010-08-06 20:19:23 +03:00
|
|
|
});
|
|
|
|
*/
|
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
/* ========= SETTING OPTIONS ========= */
|
|
|
|
|
|
|
|
// Set options when setting up the videos. The defaults are shown here.
|
2010-08-06 20:19:23 +03:00
|
|
|
|
|
|
|
/*
|
2010-08-20 07:33:30 +03:00
|
|
|
VideoJS.setupAllWhenReady({
|
2010-08-06 20:19:23 +03:00
|
|
|
controlsBelow: false, // Display control bar below video instead of in front of
|
|
|
|
controlsHiding: true, // Hide controls when mouse is not over the video
|
|
|
|
defaultVolume: 0.85, // Will be overridden by user's last volume if available
|
|
|
|
flashVersion: 9, // Required flash version for fallback
|
|
|
|
linksHiding: true // Hide download links when video is supported
|
|
|
|
});
|
|
|
|
*/
|
2010-05-18 05:51:17 +03:00
|
|
|
|
2010-08-20 07:33:30 +03:00
|
|
|
// Or as the second option of VideoJS.setup
|
|
|
|
|
|
|
|
/*
|
|
|
|
VideoJS.DOMReady(function(){
|
|
|
|
var myPlayer = VideoJS.setup("example_video_1", {
|
|
|
|
// Same options
|
|
|
|
});
|
|
|
|
});
|
|
|
|
*/
|
|
|
|
|
2010-05-18 05:51:17 +03:00
|
|
|
</script>
|
2010-08-20 07:37:19 +03:00
|
|
|
|
2010-06-03 08:03:03 +03:00
|
|
|
<!-- Include the VideoJS Stylesheet -->
|
2010-09-26 08:28:04 +03:00
|
|
|
<link rel="stylesheet" href="video-js.css" type="text/css" media="screen" title="Video JS">
|
2010-05-18 05:51:17 +03:00
|
|
|
</head>
|
2010-06-03 08:03:03 +03:00
|
|
|
<body>
|
2010-06-09 11:24:12 +03:00
|
|
|
|
2010-06-03 08:03:03 +03:00
|
|
|
<!-- Begin VideoJS -->
|
2010-05-21 19:53:37 +03:00
|
|
|
<div class="video-js-box">
|
2010-06-03 08:03:03 +03:00
|
|
|
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
|
2010-09-26 08:28:04 +03:00
|
|
|
<video id="example_video_1" class="video-js" width="640" height="264" controls="controls" preload="auto" poster="http://video-js.zencoder.com/oceans-clip.png">
|
2010-10-19 07:51:02 +03:00
|
|
|
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
|
|
|
|
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
|
2010-10-21 08:07:38 +03:00
|
|
|
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"' />
|
2010-06-27 07:48:05 +03:00
|
|
|
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
|
2010-10-19 07:51:02 +03:00
|
|
|
<object id="flash_fallback_1" class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
|
2010-05-21 19:53:37 +03:00
|
|
|
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
|
|
|
|
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
|
|
|
|
<param name="allowfullscreen" value="true" />
|
2010-08-20 01:51:53 +03:00
|
|
|
<param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}]}' />
|
2010-08-06 20:19:23 +03:00
|
|
|
<!-- Image Fallback. Typically the same as the poster image. -->
|
2010-06-09 11:24:12 +03:00
|
|
|
<img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
|
2010-06-03 08:03:03 +03:00
|
|
|
title="No video playback capabilities." />
|
2010-05-21 19:53:37 +03:00
|
|
|
</object>
|
|
|
|
</video>
|
2010-06-27 07:48:05 +03:00
|
|
|
<!-- Download links provided for devices that can't play video in the browser. -->
|
2010-06-03 08:03:03 +03:00
|
|
|
<p class="vjs-no-video"><strong>Download Video:</strong>
|
2010-06-03 18:53:27 +03:00
|
|
|
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
|
|
|
|
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
|
2010-09-19 03:50:54 +03:00
|
|
|
<a href="http://video-js.zencoder.com/oceans-clip.ogv">Ogg</a><br>
|
2010-06-27 07:48:05 +03:00
|
|
|
<!-- Support VideoJS by keeping this link. -->
|
2010-09-18 06:19:16 +03:00
|
|
|
<a href="http://videojs.com">HTML5 Video Player</a> by VideoJS
|
2010-06-03 08:03:03 +03:00
|
|
|
</p>
|
2010-05-21 19:53:37 +03:00
|
|
|
</div>
|
2010-06-03 08:03:03 +03:00
|
|
|
<!-- End VideoJS -->
|
2010-06-09 11:24:12 +03:00
|
|
|
|
2010-05-18 05:51:17 +03:00
|
|
|
</body>
|
|
|
|
</html>
|