1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-21 01:39:04 +02:00

Added skins page.

This commit is contained in:
Steve Heffernan 2010-06-27 23:12:45 -07:00
parent b53e259d23
commit 39957db395
9 changed files with 427 additions and 139 deletions

View File

@ -39,6 +39,7 @@
<div id="main">
<ul id="nav">
<li><a href="http://videojs.com/skins.html">Skins</a></li>
<li><a href="http://github.com/zencoder/video-js">Source</a></li>
<li><a href="http://wiki.github.com/zencoder/video-js/browser-device-compatibility">Compatibility</a></li>
<li><a href="http://github.com/zencoder/video-js/issues">Issue Tracker</a></li>

View File

@ -39,6 +39,7 @@
<div id="main">
<ul id="nav">
<li><a href="http://videojs.com/skins.html">Skins</a></li>
<li><a href="http://github.com/zencoder/video-js">Source</a></li>
<li><a href="http://wiki.github.com/zencoder/video-js/browser-device-compatibility">Compatibility</a></li>
<li><a href="http://github.com/zencoder/video-js/issues">Issue Tracker</a></li>

View File

@ -1,3 +1,131 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Skins | HTML5 Video Player | Video JS</title>
<meta name="google-site-verification" content="QHf9MEYVlEWoNHbzTeUkSQsbRT5Twzqu6N0nX1i3nes" />
<script src="video-js/video.js" type="text/javascript" charset="utf-8"></script>
<!-- JQuery not required, but used for dom ready function -->
<script src="javascripts/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="stylesheets/base.css" type="text/css" media="all" charset="utf-8" />
<link rel="stylesheet" href="video-js/video-js.css" type="text/css" media="all" charset="utf-8" />
<link rel="stylesheet" href="stylesheets/site.css" type="text/css" media="all" charset="utf-8" />
<link rel="stylesheet" href="video-js/skins/tube.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="video-js/skins/vim.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="video-js/skins/hu.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<!--[if !IE 7]>
<style type="text/css">
#wrap {display:table;height:100%}
</style>
<![endif]-->
<script type="text/javascript" charset="utf-8">
// Using JQuery's DOM Ready function
// You can also use window.onload, but it loads slower
$(function(){
VideoJS.setup();
})
// If not using a JS library
// window.onload = function(){
// VideoJS.setup();
// }
</script>
</head>
<body>
<div id="wrap">
<div id="main">
<ul id="nav">
<li><a href="http://videojs.com/skins.html">Skins</a></li>
<li><a href="http://github.com/zencoder/video-js">Source</a></li>
<li><a href="http://wiki.github.com/zencoder/video-js/browser-device-compatibility">Compatibility</a></li>
<li><a href="http://github.com/zencoder/video-js/issues">Issue Tracker</a></li>
<li><a href="http://wiki.github.com/zencoder/video-js/">Wiki</a></li>
</ul>
<h1>Video JS Skins</h1>
<p class="tagline">Replicas of some well known skins using just CSS</p>
<p>These skins were created to show how you can re-skin VideoJS using just CSS. To use these skins, download the CSS file and include in the same document as VideoJS. Then add the skin's classname to the video-js-box.</p>
<p>&lt;div class="video-js-box vim-css"&gt;</p>
<h2>The Original</h2>
<div class="video-js-box">
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<p>You need an HTML5 video compatible browser to view these skins.</p>
</video>
</div>
<p>No additional files needed.</p>
<h2>VimCSS</h2>
<div class="video-js-box vim-css">
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
</video>
</div>
<p>Download <a href="video-js/skins/vim.css">VimCSS</a>. Add the class "vim-css".</p>
<h2>HuCSS</h2>
<!-- Begin VideoJS -->
<div class="video-js-box hu-css">
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
</video>
</div>
<p>Download <a href="video-js/skins/hu.css">HuCSS</a>. Add the class "hu-css".</p>
<h2>TubeCSS</h2>
<div class="video-js-box tube-css">
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
</video>
</div>
<p>Download <a href="video-js/skins/tube.css">TubeCSS</a>. Add the class "tube-css".</p>
</div>
</div>
<div id="footer">
&copy; <a href="http://videojs.com">The Video JS Project</a>. Sponsored by <a href="http://zencoder.com">Zencoder</a>.
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-16505296-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
@ -14,111 +142,13 @@
</script>
<link rel="stylesheet" href="video-js/video-js.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="skins/tube.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="skins/vim.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="skins/hu.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="video-js/skins/tube.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="video-js/skins/vim.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
<link rel="stylesheet" href="video-js/skins/hu.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
</head>
<body>
<!-- Begin VideoJS -->
<div class="video-js-box hu-css">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
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" />
<param name="flashvars" value='config={"clip":{"url":"http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}}' />
<!-- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." /> -->
</object>
</video>
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
<a href="http://video-js.zencoder.com/oceans-clip.ogg">Ogg</a><br>
<a href="http://videojs.com">HTML5 Video Player</a> by <a href="http://videojs.com">VideoJS</a>
</p>
</div>
<!-- End VideoJS -->
<!-- Begin VideoJS -->
<div class="video-js-box">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
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" />
<param name="flashvars" value='config={"clip":{"url":"http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}}' />
<!-- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." /> -->
</object>
</video>
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
<a href="http://video-js.zencoder.com/oceans-clip.ogg">Ogg</a><br>
<a href="http://videojs.com">HTML5 Video Player</a> by <a href="http://videojs.com">VideoJS</a>
</p>
</div>
<!-- End VideoJS -->
<!-- Begin VideoJS -->
<div class="video-js-box tube-css">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
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" />
<param name="flashvars" value='config={"clip":{"url":"http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}}' />
<!-- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." /> -->
</object>
</video>
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
<a href="http://video-js.zencoder.com/oceans-clip.ogg">Ogg</a><br>
<a href="http://videojs.com">HTML5 Video Player</a> by <a href="http://videojs.com">VideoJS</a>
</p>
</div>
<!-- End VideoJS -->
<!-- Begin VideoJS -->
<div class="video-js-box vim-css">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
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" />
<param name="flashvars" value='config={"clip":{"url":"http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}}' />
<!-- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." /> -->
</object>
</video>
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
<a href="http://video-js.zencoder.com/oceans-clip.ogg">Ogg</a><br>
<a href="http://videojs.com">HTML5 Video Player</a> by <a href="http://videojs.com">VideoJS</a>
</p>
</div>
<!-- End VideoJS -->
<!-- <p><label>Control Background</label><input type="text" name="control_background" value="" id="control_background"></p>
<p><label>Control Border Radius</label><input type="text" name="control_border_radius" value="" id="control_border_radius"></p> -->

View File

@ -3,6 +3,7 @@ body { font-size: 10px; line-height: 1; color: #fff; text-align: center; }
#wrap { background: url("../images/background-highlights.png") center 20px no-repeat; }
#main { position: relative; width: 640px; margin: 0px auto; text-align: left; padding-bottom: 20px; }
h1 { font-size: 360%; line-height: 1; margin-bottom: 10px; text-align: center; letter-spacing: 5px; }
h2 { font-size: 200%; line-height: 1; margin-bottom: 10px; }
h6 { font-size: 100%; text-transform: uppercase; margin-bottom: 10px; color: #999; }
p.tagline { text-align: center; font-size: 120%; line-height: 1; }

View File

@ -34,23 +34,27 @@
<!-- Begin VideoJS -->
<div class="video-js-box">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload autoplay>
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload>
<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"'>
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"'>
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
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" />
<param name="flashvars" value='config={"clip":{"url":"http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}}' />
<!-- Image Fallback -->
<img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." />
</object>
</video>
<!-- Download links provided for devices that can't play video in the browser. -->
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
<a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
<a href="http://video-js.zencoder.com/oceans-clip.ogg">Ogg</a><br>
<!-- Support VideoJS by keeping this link. -->
<a href="http://videojs.com">HTML5 Video Player</a> by <a href="http://videojs.com">VideoJS</a>
</p>
</div>

99
video-js/skins/hu.css Normal file
View File

@ -0,0 +1,99 @@
.hu-css .vjs-controls {
height: 47px; opacity: 0.95; color: #fff;
padding-left: 84px; /* Width of play button + margin */
padding-right: 0px; /* Width of all the controls to the right of the progress control + margins */
background: #3A3835;
}
.hu-css .vjs-controls > li {
background: none;
border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;
box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
}
/* Top Level Items */
.hu-css .vjs-controls > li.vjs-play-control,
.hu-css .vjs-controls > li.vjs-volume-control,
.hu-css .vjs-controls > li.vjs-fullscreen-control {
bottom: 20px; height: 27px;
}
/* Bottom Level Items */
.hu-css .vjs-controls > li.vjs-progress-control, .hu-css .vjs-controls > li.vjs-time-control {
margin-top: 28px; height: 19px;
}
/* Placement of Control Items */
.hu-css .vjs-controls > li.vjs-play-control { width: 33px; left: 0px; }
.hu-css .vjs-controls > li.vjs-progress-control { width: 100%; position: relative; }
.hu-css .vjs-controls > li.vjs-time-control { width: 84px; left: 0px; }
.hu-css .vjs-controls > li.vjs-volume-control { width: 43px; right: 44px; }
.hu-css .vjs-controls > li.vjs-fullscreen-control { width: 43px; right: 0px; }
/* Play/Pause
-------------------------------------------------------------------------------- */
.hu-css .vjs-play-control.vjs-play span { margin: 9px 0 0 12px; }
.hu-css .vjs-play-control.vjs-pause span { margin: 9px 0 0 12px; }
.hu-css .vjs-play-control:hover { background-color: #000; }
/* Progress
-------------------------------------------------------------------------------- */
.hu-css .vjs-progress-holder { /* Box containing play and load progresses */
height: 19px; border: none;
margin: 0px 0px 0 0px; /* Placement within the progress control item */
background: #000;
border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;
}
.hu-css .vjs-progress-holder li { height: 13px; margin-top: 3px; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.hu-css .vjs-play-progress {
/* Default */ background: #777;
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#999), to(#777));
/* Firefox */ background: -moz-linear-gradient(top, #999, #777);
}
.hu-css .vjs-load-progress { background: #555; }
/* Time Display
-------------------------------------------------------------------------------- */
.hu-css .vjs-controls .vjs-time-control { font-size: 11px; background: #000; }
.hu-css .vjs-controls .vjs-time-control span { line-height: 19px; /* Centering vertically */ }
/* Volume
-------------------------------------------------------------------------------- */
/*.hu-css .vjs-volume-control:hover { background-color: #000; }*/
.hu-css .vjs-volume-control ul { margin: 0 5px 0 5px; padding: 9px 0 0 0; }
.hu-css .vjs-volume-control ul li { /* Individual volume bars */
margin: 0 2px 0 0; /* Space between */
width: 3px; height: 0px; /* Total height is height + bottom border */
border-bottom: 12px solid #555; /* Default (off) color and height of visible portion */
}
.hu-css .vjs-volume-control ul li.vjs-volume-level-on { border-color: #fff; /* Volume on bar color */ }
/* Creating differnt bar heights through height (transparent) and bottom border (visible). */
.hu-css .vjs-volume-control ul li:nth-child(1) { border-bottom-width: 2px; height: 10px; }
.hu-css .vjs-volume-control ul li:nth-child(2) { border-bottom-width: 4px; height: 8px; }
.hu-css .vjs-volume-control ul li:nth-child(3) { border-bottom-width: 6px; height: 6px; }
.hu-css .vjs-volume-control ul li:nth-child(4) { border-bottom-width: 8px; height: 4px; }
.hu-css .vjs-volume-control ul li:nth-child(5) { border-bottom-width: 10px; height: 2px; }
/* Fullscreen
-------------------------------------------------------------------------------- */
.hu-css .vjs-fullscreen-control:hover { background-color: #000; }
.hu-css .vjs-fullscreen-control ul { margin: 8px 0 0 0px; padding-left: 13px; height: 13px; border-left: 1px solid #555; }
.hu-css .vjs-fullscreen-control ul li:nth-child(1) { margin-right: 9px; margin-bottom: 5px; border-top: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.hu-css .vjs-fullscreen-control ul li:nth-child(2) { border-top: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.hu-css .vjs-fullscreen-control ul li:nth-child(3) { clear: both; margin: 0 9px 0 0; border-bottom: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.hu-css .vjs-fullscreen-control ul li:nth-child(4) { border-bottom: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
/* Icon when video is in fullscreen mode */
.hu-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(1) { border: none; border-bottom: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.hu-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(2) { border: none; border-bottom: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.hu-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(3) { border: none; border-top: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.hu-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(4) { border: none; border-top: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }

82
video-js/skins/tube.css Normal file
View File

@ -0,0 +1,82 @@
.tube-css .vjs-controls {
opacity: 1; color: #000;
height: 25px;
padding-left: 102px; /* Width of play button + margin */
padding-right: 83px; /* Width of all the controls to the right of the progress control + margins */
background-color: #ccc;
background: #fcfcfc -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#d0d0d0)) left top;
background: #fcfcfc -moz-linear-gradient(top, #fcfcfc, #d0d0d0) left top;
}
.tube-css .vjs-controls > li {
height: 23px; margin: 0; background: none;
border: 1px solid #b1b1b1; border-left-color: #eee;
border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;
box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
}
/* Placement of Control Items */
.tube-css .vjs-controls > li.vjs-play-control { width: 25px; left: 0; }
.tube-css .vjs-controls > li.vjs-progress-control { width: 100%; position: relative; }
.tube-css .vjs-controls > li.vjs-time-control { width: 75px; left: 27px; }
.tube-css .vjs-controls > li.vjs-volume-control { width: 50px; right: 30px; }
.tube-css .vjs-controls > li.vjs-fullscreen-control { width: 30px; right: 0; }
/* Removing borders on time & progress to join them */
.tube-css .vjs-controls > li.vjs-progress-control { border-left: none; }
.tube-css .vjs-controls > li.vjs-time-control { border-right: none; }
/* Play/Pause
-------------------------------------------------------------------------------- */
.tube-css .vjs-controls > li:first-child { margin-left: 0; border-left-color: #b1b1b1; }
.tube-css .vjs-play-control.vjs-play span { border-left-color: #333; border-top-width: 7px; border-left-width: 13px; border-bottom-width: 7px; margin: 5px 0 0 7px; }
.tube-css .vjs-play-control.vjs-pause span { height: 14px; margin: 5px auto 0; border-left: 4px solid #333; border-right: 4px solid #333; }
.tube-css .vjs-play-control.vjs-play:hover span { border-left-color: #CF1A1A; }
.tube-css .vjs-play-control.vjs-pause:hover span { border-left-color: #CF1A1A; border-right-color: #CF1A1A; }
/* Time Display
-------------------------------------------------------------------------------- */
.tube-css .vjs-controls .vjs-time-control { font-size: 11px; }
.tube-css .vjs-controls .vjs-time-control span { line-height: 25px; /* Centering vertically */ }
/* Progress
-------------------------------------------------------------------------------- */
.tube-css .vjs-progress-holder {
margin-right: 10px;
background-color: #b1b1b1;
background: #b1b1b1 -webkit-gradient(linear, left top, left bottom, from(#b1b1b1), to(#cacaca)) left top;
background: #b1b1b1 -moz-linear-gradient(top, #b1b1b1, #cacaca) left top;
border-color: #CACACA; border-bottom-color: #eaeaea;
border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;
}
.tube-css .vjs-progress-control .vjs-load-progress { background: #C89191; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.tube-css .vjs-progress-control .vjs-play-progress { background: #f33; background: -webkit-gradient(linear, left top, left bottom, from(#f33), to(#CF1A1A)); background: -moz-linear-gradient(top, #f33, #CF1A1A); -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; }
/* Volume
-------------------------------------------------------------------------------- */
.tube-css .vjs-volume-control ul { padding: 3px 0 0 0; }
.tube-css .vjs-volume-control ul li { border-bottom-color: #ccc; }
/* Volume icon color */
.tube-css .vjs-volume-control ul li.vjs-volume-level-on { border-color: #333; }
/* Volume icon hovering color */
.tube-css .vjs-volume-control:hover ul li.vjs-volume-level-on { border-color: #CF1A1A; }
/* Fullscreen
-------------------------------------------------------------------------------- */
.tube-css .vjs-fullscreen-control ul { margin: 4px 0 0 8px; }
/* Fullscreen icon color */
.tube-css .vjs-fullscreen-control ul li:nth-child(3), .tube-css .vjs-fullscreen-control ul li:nth-child(4), .tube-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(1), .tube-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(2) {
border-bottom-color: #333;
}
.tube-css .vjs-fullscreen-control ul li:nth-child(1), .tube-css .vjs-fullscreen-control ul li:nth-child(2), .tube-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(3), .tube-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(4) {
border-top-color: #333;
}
/* Fullscreen icon hovering color */
.tube-css .vjs-fullscreen-control:hover ul li:nth-child(3), .tube-css .vjs-fullscreen-control:hover ul li:nth-child(4), .tube-css.vjs-fullscreen:hover .vjs-fullscreen-control ul li:nth-child(1), .tube-css.vjs-fullscreen:hover .vjs-fullscreen-control ul li:nth-child(2) {
border-bottom-color: #CF1A1A;
}
.tube-css .vjs-fullscreen-control:hover ul li:nth-child(1), .tube-css .vjs-fullscreen-control:hover ul li:nth-child(2), .tube-css.vjs-fullscreen:hover .vjs-fullscreen-control ul li:nth-child(3), .tube-css.vjs-fullscreen:hover .vjs-fullscreen-control ul li:nth-child(4) {
border-top-color: #CF1A1A;
}

62
video-js/skins/vim.css Normal file
View File

@ -0,0 +1,62 @@
.vim-css .vjs-controls {
height: 50px; opacity: 0.9; color: #fff;
padding-left: 85px; /* Width of play button + margin */
padding-right: 160px; /* Width of all the controls to the right of the progress control + margins */
}
.vim-css .vjs-controls > li {
height: 32px; width: 25px; margin: 8px 0 0 0; padding: 0; text-align: center; background: rgba(23, 35, 34, 0.746094);
border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;
box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
}
/* Placement of Control Items */
.vim-css .vjs-controls > li.vjs-play-control { width: 65px; left: 10px; }
.vim-css .vjs-controls > li.vjs-progress-control { width: 100%; position: relative; }
.vim-css .vjs-controls > li.vjs-time-control { width: 75px; right: 85px; }
.vim-css .vjs-controls > li.vjs-volume-control { width: 50px; right: 35px; }
.vim-css .vjs-controls > li.vjs-fullscreen-control { width: 25px; right: 10px; }
/* Play/Pause
-------------------------------------------------------------------------------- */
.vim-css .vjs-controls .vjs-play-control { margin: 0; height: 40px; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; }
.vim-css .vjs-play-control.vjs-play span { border-left-color: #fff; border-top-width: 9px; border-left-width: 18px; border-bottom-width: 9px; margin: 11px 0 0 24px; }
.vim-css .vjs-play-control:hover { background: #00ADEF; }
.vim-css .vjs-play-control.vjs-pause span { width: 5px; height: 18px; margin: 5px auto 0; border-left: 5px solid #fff; border-right: 5px solid #fff; margin: 11px 0 0 24px; }
/* Progress
-------------------------------------------------------------------------------- */
.vim-css .vjs-controls .vjs-progress-control { border-radius: 5px 0 0 5px; -webkit-border-radius: 5px 0 0 5px; -moz-border-radius: 5px 0 0 5px; }
.vim-css .vjs-progress-control .vjs-progress-holder { height: 8px; padding: 1px; margin: 10px 5px 0 10px; border-color: #666666; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.vim-css .vjs-progress-control .vjs-play-progress { height: 8px; background: #00ADEF; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.vim-css .vjs-progress-control .vjs-load-progress { height: 8px; background: #898F8F; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
/* Time Display
-------------------------------------------------------------------------------- */
.vim-css .vjs-controls .vjs-time-control { font-size: 11px; }
.vim-css .vjs-controls .vjs-time-control span { line-height: 32px; /* Centering vertically */ }
/* Volume
-------------------------------------------------------------------------------- */
.vim-css .vjs-volume-control ul { padding: 7px 0 0 5px; width: 30px; }
.vim-css .vjs-volume-control ul li {
float: left; margin: 0 2px 0 0; padding: 0; list-style: none; width: 3px; height: 3px; border-bottom: 12px solid #666666;
-webkit-transition: all 100ms linear; -moz-transition: all 100ms linear;
}
.vim-css .vjs-volume-control ul li.vjs-volume-level-on { border-color: #00ADEF; }
.vim-css .vjs-volume-control ul li:hover { height: 0; border-bottom-width: 15px; }
/* Fullscreen
-------------------------------------------------------------------------------- */
.vim-css .vjs-fullscreen-control ul { margin: 10px 0 0 0; }
.vim-css .vjs-controls .vjs-fullscreen-control { border-radius: 0 5px 5px 0; -webkit-border-radius: 0 5px 5px 0; -moz-border-radius: 0 5px 5px 0; }
/* Making default fullscreen icon smaller */
.vim-css .vjs-fullscreen-control ul li:nth-child(1) { margin: 0 4px 4px 0; border: none; border-top: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.vim-css .vjs-fullscreen-control ul li:nth-child(2) { border: none; border-top: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.vim-css .vjs-fullscreen-control ul li:nth-child(3) { clear: both; margin: 0 4px 0 0; border: none; border-bottom: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.vim-css .vjs-fullscreen-control ul li:nth-child(4) { border: none; border-bottom: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.vim-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(1) { border: none; border-bottom: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.vim-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(2) { border: none; border-bottom: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
.vim-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(3) { border: none; border-top: 4px solid #fff; border-left: 4px solid rgba(0,0,0,0); }
.vim-css.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(4) { border: none; border-top: 4px solid #fff; border-right: 4px solid rgba(0,0,0,0); }
/* Fullscreen control hovering */
.vim-css .vjs-fullscreen-control:hover ul li:nth-child(3), .vim-css .vjs-fullscreen-control:hover ul li:nth-child(4), .vim-css.vjs-fullscreen .vjs-fullscreen-control:hover ul li:nth-child(1), .vim-css.vjs-fullscreen .vjs-fullscreen-control:hover ul li:nth-child(2) { border-bottom-color: #00ADEF; }
.vim-css .vjs-fullscreen-control:hover ul li:nth-child(1), .vim-css .vjs-fullscreen-control:hover ul li:nth-child(2), .vim-css.vjs-fullscreen .vjs-fullscreen-control:hover ul li:nth-child(3), .vim-css.vjs-fullscreen .vjs-fullscreen-control:hover ul li:nth-child(4) { border-top-color: #00ADEF; }

View File

@ -31,14 +31,17 @@ var VideoJS = Class.extend({
this.video = element;
// Hide default controls
this.video.controls = false;
// Default Options
this.options = {
num: 0, // Optional tracking of videoJSPLayers position
controlsBelow: false, // Display control bar below video vs. on top
controlsHiding: true, // Hide controls when not over the video
defaultVolume: 0.85, // Will be overridden by localStorage volume if available
flashVersion: 9,
linksHiding: true
flashVersion: 9, // Required flash version for fallback
linksHiding: true // Hide download links when video is supported
};
// Override default options with set options
if (typeof setOptions == "object") _V_.merge(this.options, setOptions);
@ -46,23 +49,25 @@ var VideoJS = Class.extend({
this.box = this.video.parentNode;
this.flashFallback = this.getFlashFallback();
this.linksFallback = this.getLinksFallback();
this.percentLoaded = 0;
// Hide download links if video can play
if(VideoJS.browserSupportsVideo() || ((this.flashFallback || VideoJS.isIE()) && this.flashVersionSupported())) {
this.hideLinksFallback();
}
// Check if browser can play HTML5 video
if (VideoJS.browserSupportsVideo()) {
// Force flash fallback when there's no supported source
if (this.canPlaySource() == false) {
this.hideLinksFallback();
this.replaceWithFlash();
return;
}
} else if (VideoJS.browserFlashVersion() >= this.options.flashVersion) {
this.hideLinksFallback();
return;
} else {
return;
}
this.hideLinksFallback();
// For iPads, controls need to always show because there's no hover
// The controls also have to be below for the full-window mode to work.
if (VideoJS.isIpad()) {
this.options.controlsBelow = true;
this.options.controlsHiding = false;
@ -71,13 +76,13 @@ var VideoJS = Class.extend({
if (this.options.controlsBelow) {
_V_.addClass(this.box, "vjs-controls-below");
}
// Store amount of video loaded
this.percentLoaded = 0;
this.buildPoster();
this.showPoster();
// Hide default controls
this.video.controls = false;
this.buildController();
this.showController();
@ -260,7 +265,7 @@ var VideoJS = Class.extend({
getFlashFallback: function(){
if (VideoJS.isIE()) return;
var children = this.box.getElementsByClassName("vjs-flash-fallback");
for (var i=0; i<children.length; i++) {
for (var i=0,j=children.length; i<j; i++) {
if (children[i].tagName.toUpperCase() == "OBJECT") {
return children[i];
}
@ -269,8 +274,10 @@ var VideoJS = Class.extend({
replaceWithFlash: function(){
// this.flashFallback = this.video.removeChild(this.flashFallback);
this.box.appendChild(this.flashFallback);
this.video.style.display = "none"; // Removing it was breaking later players
if (this.flashFallback) {
this.box.insertBefore(this.flashFallback, this.video);
this.video.style.display = "none"; // Removing it was breaking later players
}
},
// Show the controller
@ -358,7 +365,7 @@ var VideoJS = Class.extend({
canPlaySource: function(){
var children = this.video.children;
for (var i=0; i<children.length; i++) {
for (var i=0,j=children.length; i<j; i++) {
if (children[i].tagName.toUpperCase() == "SOURCE") {
var canPlay = this.video.canPlayType(children[i].type);
if(canPlay == "probably" || canPlay == "maybe") {
@ -638,7 +645,7 @@ var VideoJS = Class.extend({
},
nativeFullscreenOn: function(){
if(typeof this.video.webkitEnterFullScreen == 'function') {
if(typeof this.video.webkitEnterFullScreen == 'function' && false) {
// Seems to be broken in Chromium/Chrome
if (!navigator.userAgent.match("Chrome")) {
this.video.webkitEnterFullScreen();
@ -663,6 +670,10 @@ var VideoJS = Class.extend({
// Resize to original settings
this.positionController();
this.positionPoster();
},
flashVersionSupported: function(){
return VideoJS.getFlashVersion() >= this.options.flashVersion;
}
})
@ -681,8 +692,7 @@ var _V_ = {
},
merge: function(obj1, obj2){
for (attrname in obj2) { obj1[attrname] = obj2[attrname]; }
return obj1;
for(attrname in obj2){obj1[attrname]=obj2[attrname];} return obj1;
},
createElement: function(tagName, attributes){
@ -723,20 +733,19 @@ var _V_ = {
}
return curleft;
},
getComputedStyleValue: function(element, style){
return window.getComputedStyle(element, null).getPropertyValue(style);
}
}
// Class Methods
// Add video-js to any video tag with the class
VideoJS.setup = function(options){
var videoCount = document.getElementsByTagName("video").length
for (var i=0;i<videoCount;i++) {
videoTag = document.getElementsByTagName("video")[i];
var elements = document.getElementsByTagName("video");
for (var i=0,j=elements.length; i<j; i++) {
videoTag = elements[i];
if (videoTag.className.indexOf("video-js") != -1) {
options = (options) ? _V_.merge(options, { num: i }) : options;
videoJSPlayers[i] = new VideoJS(videoTag, options);
@ -746,34 +755,33 @@ VideoJS.setup = function(options){
// Check if the browser supports video.
VideoJS.browserSupportsVideo = function() {
return !!document.createElement('video').canPlayType;
if (typeof VideoJS.videoSupport != "undefined") return VideoJS.videoSupport;
return VideoJS.videoSupport = !!document.createElement('video').canPlayType;
}
VideoJS.isIpad = function(){
return navigator.userAgent.match(/iPad/i) != null;
}
VideoJS.browserFlashVersion = function(){
VideoJS.getFlashVersion = function(){
// Cache Version
if (typeof VideoJS.flashVersion != "undefined") return VideoJS.flashVersion;
var version = 0;
if (typeof navigator.plugins != "undefined" && typeof navigator.plugins["Shockwave Flash"] == "object") {
desc = navigator.plugins["Shockwave Flash"].description;
if (desc && !(typeof navigator.mimeTypes != "undefined" && navigator.mimeTypes["application/x-shockwave-flash"] && !navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)) {
return parseInt(desc.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1]);
version = parseInt(desc.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1]);
}
} else if (typeof window.ActiveXObject != "undefined") {
try {
var testObject = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
if (testObject) {
return parseInt(testObject.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1]);
version = parseInt(testObject.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1]);
}
}
catch(e) { return false; }
catch(e) {}
}
return 0;
return VideoJS.flashVersion = version;
}
VideoJS.isIE = function(){
return !+"\v1";
}
VideoJS.isIE = function(){ return !+"\v1"; }
VideoJS.isIpad = function(){ return navigator.userAgent.match(/iPad/i) != null; }
// Allows for binding context to functions
// when using in event listeners and timeouts