1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

Created new skins and html.

This commit is contained in:
Steve Heffernan 2010-06-26 21:20:04 -07:00
parent 7f2882cdd3
commit b53e259d23
7 changed files with 598 additions and 105 deletions

127
skins.html Normal file
View File

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Video Player</title>
<script src="javascripts/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="video-js/video.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
VideoJS.setup({ controlsHiding: false });
})
</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">
</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> -->
</body>
</html>

99
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
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
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

@ -34,7 +34,7 @@
<!-- 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>
<video class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload autoplay>
<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"'>

View File

@ -1,75 +1,166 @@
.video-js-box { text-align: left; position: relative; }
/* REQUIRED STYLES (be careful overriding)
================================================================================ */
/* Box containing video, controls, and download links.
If you want to add some kind of frame, use another containing element, not this one. */
.video-js-box { text-align: left; position: relative; } /* Will be set to the width of the video element */
/* Video Element */
video.video-js { background-color: #000; position: relative; }
/* Fullscreen styles for main elements */
.video-js-box.vjs-fullscreen { position: fixed; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: 1000; }
.video-js-box.vjs-fullscreen video.video-js { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1001; }
.video-js-box.vjs-fullscreen .vjs-controls { z-index: 1002; }
.vjs-controls { display: none; position: absolute; margin: 0; padding: 0; border: none; left: 0; }
/* Poster styles */
.vjs-poster { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* DEFAULT SKIN (override in another file)
================================================================================
Using all CSS to draw the controls. Images could be used if desired.
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
so you can upgrade to newer versions easier. */
/* Controls Layout
Using a Holy Grail type method to allow the progress bar holder to expand into all available space,
but using abosolute positioning for individual controls. http://www.alistapart.com/articles/holygrail */
.vjs-controls {
list-style: none; position: absolute; margin: 0; border: none; opacity: 0.85; color: #fff;
display: none; /* Start hidden */
left: 0; right: 0; /* 100% width of video-js-box */
height: 35px; /* Including any margin you want above or below control items */
padding-left: 35px; /* Width of play button + margin */
padding-right: 165px; /* Width of all the controls to the right of the progress control + margins */
}
/* Controls styles when below the video */
.video-js-box.vjs-controls-below .vjs-controls { background-color: #000; }
img.vjs-poster { display: block; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; }
.video-js-box p { font-size: small; }
/* DEFAULT SKIN */
/* Using all CSS to draw the controls. Images could be used to simplify the CSS if desired.
.vjs-controls > li { /* Direct li children of control bar */
position: absolute; list-style: none; float: left; padding: 0; text-align: center;
height: 25px; /* Default height of individual controls */
margin: 5px 0 0 0; /* Top margin to put space between video and controls when controls are below */
/* General controls styles */
.vjs-controls { list-style: none; height: 35px; opacity: 0.85; color: #fff; }
.vjs-controls > li { list-style: none; float: left; height: 25px; width: 25px; margin: 5px 5px 0 0; padding: 0; text-align: center;
/* CSS Background Gradients */
/* Default */ background-color: #0B151A;
/* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 12px;
/* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 12px;
/* CONTROL ITEM BORDER AND BACKGROUND COLOR */
/* CSS Curved Corners */
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
background-color: #0B151A; border-radius: 5px; box-shadow: 0px 2px 2px #000;
/* Webkit */
-webkit-border-radius: 5px;
background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 12px;
-webkit-box-shadow: 0px 1px 3px #000;
/* Firefox */
-moz-border-radius: 5px;
background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 12px;
-moz-box-shadow: 0px 1px 3px #000;
/* CSS Shadows */
box-shadow: 1px 1px 2px #000; -webkit-box-shadow: 1px 1px 2px #000; -moz-box-shadow: 1px 1px 2px #000;
}
/* Placement of Control Items */
.vjs-controls > li.vjs-play-control { width: 25px; left: 5px; }
.vjs-controls > li.vjs-progress-control { width: 100%; position: relative; }
.vjs-controls > li.vjs-time-control { width: 75px; right: 90px; }
.vjs-controls > li.vjs-volume-control { width: 50px; right: 35px; }
.vjs-controls > li.vjs-fullscreen-control { width: 25px; right: 5px; }
/* Removing curves on progress control and time control to join them. */
.vjs-controls > li.vjs-progress-control {
border-top-right-radius: 0; -webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0;
border-bottom-right-radius: 0; -webkit-border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0;
}
.vjs-controls > li.vjs-time-control {
border-top-left-radius: 0; -webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0;
border-bottom-left-radius: 0; -webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0;
}
.vjs-controls > li:first-child { margin-left: 5px; }
.vjs-controls > li:last-child { margin-right: 0; }
/* Play/Pause */
.vjs-play-control span { display: block; font-size: 0px; line-height: 0; text-decoration: none; cursor: pointer !important; }
.vjs-play-control.vjs-play span { width: 0; height: 0; margin: 8px 0 0 8px; border-top: 5px solid #273F3E; border-left: 10px solid #fff; border-bottom: 5px solid #112129; }
.vjs-play-control.vjs-pause span { width: 3px; height: 10px; margin: 8px auto 0; border-top: 0px; border-left: 3px solid #fff; border-bottom: 0px; border-right: 3px solid #fff; }
/* Progress */
.vjs-progress-control ul { list-style: none; margin: 0; padding: 0; cursor: pointer !important; }
.vjs-progress-control .vjs-progress-holder { list-style: none; position: relative; float: left; height: 9px; border: 1px solid #777; margin: 7px 0 0 5px; padding: 0; background-color: #112129; overflow:hidden; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
.vjs-progress-control .vjs-play-progress { position: absolute; display: block; width: 0px; height: 9px; background: #fff;
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
background: -moz-linear-gradient(top, #fff, #777);
/* Play/Pause
-------------------------------------------------------------------------------- */
.vjs-play-control { cursor: pointer !important; }
.vjs-play-control span { display: block; font-size: 0; line-height: 0; }
.vjs-play-control.vjs-play span {
width: 0; height: 0; margin: 8px 0 0 8px;
/* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
border-left: 10px solid #fff; /* Width & Color of play icon */
/* Height of play icon is total top & bottom border widths. Color is transparent. */
border-top: 5px solid rgba(0,0,0,0); border-bottom: 5px solid rgba(0,0,0,0);
}
.vjs-progress-control .vjs-load-progress { position: absolute; display: block; width: 0px; height: 9px; background-color: #777; opacity: 0.5;
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
background: -webkit-gradient(linear, left top, left bottom, from(#999), to(#ccc));
background: -moz-linear-gradient(top, #999, #ccc);
.vjs-play-control.vjs-pause span {
width: 3px; height: 10px; margin: 8px auto 0;
/* Drawing the pause bars with borders */
border-top: 0px; border-left: 3px solid #fff; border-bottom: 0px; border-right: 3px solid #fff;
}
.vjs-progress-control .vjs-progress-time { list-style: none; float: left; margin: 7px 0 0 5px; padding: 0; font-size: 10px; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
/* Volume */
.vjs-volume-control { width: 50px !important; cursor: pointer !important; }
.vjs-volume-control ul { display: block; margin: 0 5px 0 5px; padding: 4px 0 0 0; list-style: none; }
.vjs-volume-control ul li { float: left; margin: 0 2px 0 0; padding: 0; list-style: none; width: 5px; height: 0px; border-bottom: 18px solid #555; }
.vjs-volume-control ul li:last-child { margin-right: 0; }
/* Progress
-------------------------------------------------------------------------------- */
.vjs-progress-holder { /* Box containing play and load progresses */
position: relative; list-style: none; padding: 0; overflow:hidden; cursor: pointer !important;
height: 9px; border: 1px solid #777;
margin: 7px 1px 0 5px; /* Placement within the progress control item */
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
}
.vjs-progress-holder li { /* Progress Bars */
position: absolute; display: block; width: 0; height: 9px;
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
}
.vjs-play-progress {
/* Default */ background: #fff;
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
/* Firefox */ background: -moz-linear-gradient(top, #fff, #777);
}
.vjs-load-progress {
opacity: 0.8;
/* Default */ background-color: #555;
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#aaa));
/* Firefox */ background: -moz-linear-gradient(top, #555, #aaa);
}
/* Time Display
-------------------------------------------------------------------------------- */
.vjs-controls .vjs-time-control { font-size: 10px; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
.vjs-controls .vjs-time-control span { line-height: 25px; /* Centering vertically */ }
/* Volume
-------------------------------------------------------------------------------- */
.vjs-volume-control { cursor: pointer !important; }
.vjs-volume-control ul { list-style: none; display: block; margin: 0 5px 0 5px; padding: 4px 0 0 0; }
/* Drawing the volume icon using 6 li elements */
.vjs-volume-control ul li { /* Individual volume bars */
list-style: none; float: left; padding: 0;
margin: 0 2px 0 0; /* Space between */
width: 5px; height: 0px; /* Total height is height + bottom border */
border-bottom: 18px solid #555; /* Default (off) color and height of visible portion */
}
.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). */
.vjs-volume-control ul li:nth-child(1) { border-bottom-width: 2px; height: 16px; }
.vjs-volume-control ul li:nth-child(2) { border-bottom-width: 4px; height: 14px; }
.vjs-volume-control ul li:nth-child(3) { border-bottom-width: 7px; height: 11px; }
.vjs-volume-control ul li:nth-child(4) { border-bottom-width: 10px; height: 8px; }
.vjs-volume-control ul li:nth-child(5) { border-bottom-width: 14px; height: 4px; }
.vjs-volume-control ul li:nth-child(6) { margin-right: 0; }
/* Fullscreen */
.vjs-fullscreen-control ul { list-style: none; margin: 5px 0 0 5px; padding: 0; width: 20px; height: 20px; text-align: left; vertical-align: top; cursor: pointer !important; }
/* Fullscreen
-------------------------------------------------------------------------------- */
.vjs-fullscreen-control { cursor: pointer !important; }
.vjs-fullscreen-control ul {
list-style: none; padding: 0; text-align: left; vertical-align: top; cursor: pointer !important;
margin: 5px 0 0 5px; /* Placement within the fullscreen control item */
width: 20px; height: 20px;
}
/* Drawing the fullscreen icon using 4 li elements */
.vjs-fullscreen-control ul li { list-style: none; float: left; margin: 0; padding: 0; font-size: 0; line-height: 0; width: 0; text-align: left; vertical-align: top; }
.vjs-fullscreen-control ul li:nth-child(1) { margin: 0 3px 3px 0; border: none; border-top: 6px solid #fff; border-right: 6px solid #273F3E; }
.vjs-fullscreen-control ul li:nth-child(2) { border: none; border-top: 6px solid #fff; border-left: 6px solid #273F3E; }
.vjs-fullscreen-control ul li:nth-child(3) { clear: both; margin: 0 3px 0 0; border: none; border-bottom: 6px solid #fff; border-right: 6px solid #112129; }
.vjs-fullscreen-control ul li:nth-child(4) { border: none; border-bottom: 6px solid #fff; border-left: 6px solid #112129; }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(1) { border: none; border-bottom: 6px solid #fff; border-left: 6px solid #273F3E; }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(2) { border: none; border-bottom: 6px solid #fff; border-right: 6px solid #273F3E; }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(3) { border: none; border-top: 6px solid #fff; border-left: 6px solid #112129; }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(4) { border: none; border-top: 6px solid #fff; border-right: 6px solid #112129; }
.vjs-fullscreen-control ul li:nth-child(1) { /* Top-left triangle */
margin-right: 3px; /* Space between top-left and top-right */
margin-bottom: 3px; /* Space between top-left and bottom-left */
border-top: 6px solid #fff; /* Height and color */
border-right: 6px solid rgba(0,0,0,0); /* Width */
}
.vjs-fullscreen-control ul li:nth-child(2) { border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
.vjs-fullscreen-control ul li:nth-child(3) { clear: both; margin: 0 3px 0 0; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
.vjs-fullscreen-control ul li:nth-child(4) { border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
/* Icon when video is in fullscreen mode */
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(1) { border: none; border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(2) { border: none; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(3) { border: none; border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control ul li:nth-child(4) { border: none; border-top: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
/* Download Links - Used for browsers that don't support any video.
-------------------------------------------------------------------------------- */
.vjs-no-video { font-size: small; }

View File

@ -169,15 +169,14 @@ var VideoJS = Class.extend({
<span></span>
</li>
<li class="vjs-progress-control">
<ul>
<li class="vjs-progress-holder">
<span class="vjs-load-progress"></span><span class="vjs-play-progress"></span>
</li>
<li class="vjs-progress-time">
<span class="vjs-current-time-display">00:00</span><span> / </span><span class="vjs-duration-display">00:00</span>
</li>
<ul class="vjs-progress-holder">
<li class="vjs-load-progress"></li>
<li class="vjs-play-progress"></li>
</ul>
</li>
<li class="vjs-time-control">
<span class="vjs-current-time-display">00:00</span><span> / </span><span class="vjs-duration-display">00:00</span>
</li>
<li class="vjs-volume-control">
<ul>
<li></li><li></li><li></li><li></li><li></li><li></li>
@ -204,37 +203,33 @@ var VideoJS = Class.extend({
this.progressControl = _V_.createElement("li", { className: "vjs-progress-control" });
this.controls.appendChild(this.progressControl);
// Create a list for the different progress elements
this.progressList = document.createElement("ul");
this.progressControl.appendChild(this.progressList);
// Create a holder for the progress bars
this.progressHolder = _V_.createElement("li", { className: "vjs-progress-holder" });
this.progressList.appendChild(this.progressHolder);
this.progressHolder = _V_.createElement("ul", { className: "vjs-progress-holder" });
this.progressControl.appendChild(this.progressHolder);
// Create the loading progress display
this.loadProgress = _V_.createElement("span", { className: "vjs-load-progress" });
this.loadProgress = _V_.createElement("li", { className: "vjs-load-progress" });
this.progressHolder.appendChild(this.loadProgress)
// Create the playing progress display
this.playProgress = _V_.createElement("span", { className: "vjs-play-progress" });
this.playProgress = _V_.createElement("li", { className: "vjs-play-progress" });
this.progressHolder.appendChild(this.playProgress);
// Create the progress time display (00:00 / 00:00)
this.progressTime = _V_.createElement("li", { className: "vjs-progress-time" });
this.progressList.appendChild(this.progressTime);
this.timeControl = _V_.createElement("li", { className: "vjs-time-control" });
this.controls.appendChild(this.timeControl);
// Create the current play time display
this.currentTimeDisplay = _V_.createElement("span", { className: "vjs-current-time-display", innerHTML: "00:00" });
this.progressTime.appendChild(this.currentTimeDisplay);
this.timeControl.appendChild(this.currentTimeDisplay);
// Add time separator
this.timeSeparator = _V_.createElement("span", { innerHTML: " / " });
this.progressTime.appendChild(this.timeSeparator);
this.timeControl.appendChild(this.timeSeparator);
// Create the total duration display
this.durationDisplay = _V_.createElement("span", { className: "vjs-duration-display", innerHTML: "00:00" });
this.progressTime.appendChild(this.durationDisplay);
this.timeControl.appendChild(this.durationDisplay);
// Create the volumne control
this.volumeControl = _V_.createElement("li", {
@ -289,8 +284,14 @@ var VideoJS = Class.extend({
// Make sure the controls are visible
if (this.controls.style.display == 'none') return;
if (this.videoIsFullScreen) {
this.box.style.width = "";
} else {
this.box.style.width = this.video.offsetWidth + "px";
}
if (this.options.controlsBelow) {
if(this.videoIsFullScreen) {
if (this.videoIsFullScreen) {
this.box.style.height = "";
this.video.style.height = (this.box.offsetHeight - this.controls.offsetHeight) + "px";
} else {
@ -302,7 +303,6 @@ var VideoJS = Class.extend({
this.controls.style.top = (this.video.offsetHeight - this.controls.offsetHeight) + "px";
}
this.controls.style.width = this.video.offsetWidth + "px";
this.sizeProgressBar();
},
@ -433,7 +433,7 @@ var VideoJS = Class.extend({
updateLoadProgress: function(){
if (this.controls.style.display == 'none') return;
this.loadProgress.style.width = (this.percentLoaded * (this.progressHolder.offsetWidth - 2)) + "px";
this.loadProgress.style.width = (this.percentLoaded * (_V_.getComputedStyleValue(this.progressHolder, "width").replace("px", ""))) + "px";
},
// React to clicks on the play/pause button
@ -525,17 +525,32 @@ var VideoJS = Class.extend({
// Adjust the width of the progress bar to fill the controls width
sizeProgressBar: function(){
this.progressControl.style.width = (
this.controls.offsetWidth
- this.playControl.offsetWidth
- this.volumeControl.offsetWidth
- this.fullscreenControl.offsetWidth
) - (5*5) + "px";
this.progressHolder.style.width = (this.progressControl.offsetWidth - (this.progressTime.offsetWidth + 20)) + "px";
// this.progressControl.style.width =
// this.controls.offsetWidth
// - this.playControl.offsetWidth
// - this.volumeControl.offsetWidth
// - this.timeControl.offsetWidth
// - this.fullscreenControl.offsetWidth
// - (this.getControlsPadding() * 6)
// - this.getControlBorderAdjustment()
// + "px";
// this.progressHolder.style.width = (this.progressControl.offsetWidth - (this.timeControl.offsetWidth + 20)) + "px";
this.updatePlayProgress();
this.updateLoadProgress();
},
// Get the space between controls. For more flexible styling.
getControlsPadding: function(){
return _V_.findPosX(this.playControl) - _V_.findPosX(this.controls)
},
// When dynamically placing controls, if there are borders on the controls, it can break to a new line.
getControlBorderAdjustment: function(){
var leftBorder = parseInt(_V_.getComputedStyleValue(this.playControl, "border-left-width").replace("px", ""));
var rightBorder = parseInt(_V_.getComputedStyleValue(this.playControl, "border-right-width").replace("px", ""));
return leftBorder + rightBorder;
},
// Track & display the current play progress
trackPlayProgress: function(){
this.playProgressInterval = setInterval(function(){ this.updatePlayProgress(); }.context(this), 33);
@ -549,14 +564,14 @@ var VideoJS = Class.extend({
// Ajust the play progress bar's width based on the current play time
updatePlayProgress: function(){
if (this.controls.style.display == 'none') return;
this.playProgress.style.width = ((this.video.currentTime / this.video.duration) * (this.progressHolder.offsetWidth - 2)) + "px";
this.playProgress.style.width = ((this.video.currentTime / this.video.duration) * (_V_.getComputedStyleValue(this.progressHolder, "width").replace("px", ""))) + "px";
this.updateTimeDisplay();
},
// Update the play position based on where the user clicked on the progresss bar
setPlayProgress: function(newProgress){
this.video.currentTime = newProgress * this.video.duration;
this.playProgress.style.width = newProgress * (this.progressHolder.offsetWidth - 2) + "px";
this.playProgress.style.width = newProgress * (_V_.getComputedStyleValue(this.progressHolder, "width").replace("px", "")) + "px";
this.updateTimeDisplay();
},
@ -588,9 +603,9 @@ var VideoJS = Class.extend({
var volNum = Math.ceil(this.video.volume * 6);
for(var i=0; i<6; i++) {
if (i < volNum) {
this.volumeDisplay.children[i].style.borderColor = "#fff";
_V_.addClass(this.volumeDisplay.children[i], "vjs-volume-level-on")
} else {
this.volumeDisplay.children[i].style.borderColor = "#555";
_V_.removeClass(this.volumeDisplay.children[i], "vjs-volume-level-on");
}
}
},
@ -598,26 +613,38 @@ var VideoJS = Class.extend({
// Turn on fullscreen (window) mode
// Real fullscreen isn't available in browsers quite yet.
fullscreenOn: function(){
this.videoIsFullScreen = true;
if (!this.nativeFullscreenOn()) {
this.videoIsFullScreen = true;
// Storing original doc overflow value to return to when fullscreen is off
this.docOrigOverflow = document.documentElement.style.overflow;
// Storing original doc overflow value to return to when fullscreen is off
this.docOrigOverflow = document.documentElement.style.overflow;
// Add listener for esc key to exit fullscreen
document.addEventListener("keydown", this.onEscKey, false);
// Add listener for esc key to exit fullscreen
document.addEventListener("keydown", this.onEscKey, false);
// Add listener for a window resize
window.addEventListener("resize", this.onWindowResize, false);
// Add listener for a window resize
window.addEventListener("resize", this.onWindowResize, false);
// Hide any scroll bars
document.documentElement.style.overflow = 'hidden';
// Hide any scroll bars
document.documentElement.style.overflow = 'hidden';
// Apply fullscreen styles
_V_.addClass(this.box, "vjs-fullscreen");
// Apply fullscreen styles
_V_.addClass(this.box, "vjs-fullscreen");
// Resize the controller and poster
this.positionController();
this.positionPoster();
// Resize the controller and poster
this.positionController();
this.positionPoster();
}
},
nativeFullscreenOn: function(){
if(typeof this.video.webkitEnterFullScreen == 'function') {
// Seems to be broken in Chromium/Chrome
if (!navigator.userAgent.match("Chrome")) {
this.video.webkitEnterFullScreen();
return true;
}
}
},
// Turn off fullscreen (window) mode
@ -695,7 +722,12 @@ var _V_ = {
curleft += obj.offsetLeft;
}
return curleft;
},
getComputedStyleValue: function(element, style){
return window.getComputedStyle(element, null).getPropertyValue(style);
}
}
// Class Methods