Commit fda5c61b by Kyle Fiedler

Added styles for speeds in video player

parent d4f5ff92
...@@ -54,6 +54,7 @@ section.course-content { ...@@ -54,6 +54,7 @@ section.course-content {
section.video-controls { section.video-controls {
@extend .clearfix; @extend .clearfix;
background: #333; background: #333;
position: relative;
border: 1px solid #000; border: 1px solid #000;
color: #ccc; color: #ccc;
...@@ -133,22 +134,47 @@ section.course-content { ...@@ -133,22 +134,47 @@ section.course-content {
float: right; float: right;
div.speeds { div.speeds {
border-right: 1px solid #000;
border-left: 1px solid #000;
@include box-shadow(1px 0 0 #555, inset 1px 0 0 #555);
float: left; float: left;
line-height: 46px; //height of play pause buttons line-height: 46px; //height of play pause buttons
padding-right: lh();
margin-right: 0; margin-right: 0;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@include box-shadow(1px 0 0 #555);
border-right: 1px solid #000;
div#video_speeds { h3 {
@include inline-block(); a {
color: #fff;
display: block;
padding: 0 lh(.5);
&:hover {
text-decoration: none;
background-color: #444;
}
}
}
ol#video_speeds {
@extend .clearfix;
background: #333;
border: 1px solid #000;
font-weight: bold; font-weight: bold;
@include inline-block();
padding: 0 lh();
position: absolute;
right: 79px;
@include box-shadow(inset 0 1px 0 #555);
span { li {
@include inline-block();
cursor: pointer; cursor: pointer;
float: left;
margin-bottom: 0; margin-bottom: 0;
margin-right: lh(.5);
&:last-child {
margin-right: 0;
}
&:hover { &:hover {
color: $mit-red; color: $mit-red;
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<div class="secondary-controls"> <div class="secondary-controls">
<div class="speeds"> <div class="speeds">
Speed: <div id="video_speeds"></div> <h3><a href="#">Speed</a></h3>
<ol id="video_speeds"></ol>
</div> </div>
<a href="#" class="hide-subtitles">on</a> <a href="#" class="hide-subtitles">on</a>
...@@ -68,6 +69,14 @@ ...@@ -68,6 +69,14 @@
$(this).text((link_text == 'on') ? 'off' : 'on'); $(this).text((link_text == 'on') ? 'off' : 'on');
return false; return false;
}); });
$('.speeds ol').hide();
$('.speeds h3 a').click(function() {
$('.speeds ol').toggle();
return false;
});
}); });
</script> </script>
</%block> </%block>
...@@ -34,9 +34,13 @@ loadNewVideo(streams["1.0"], ${ position }); ...@@ -34,9 +34,13 @@ loadNewVideo(streams["1.0"], ${ position });
function add_speed(key, stream) { function add_speed(key, stream) {
var id = 'speed_' + stream; var id = 'speed_' + stream;
$("#video_speeds").append(' <span id="'+id+'">'+key+'x</span>');
$("#video_speeds").append(' <li id="'+id+'">'+key+'x</li>');
$("#"+id).click(function(){ $("#"+id).click(function(){
change_video_speed(key, stream); change_video_speed(key, stream);
$(this).siblings().removeClass("active");
$(this).addClass("active");
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment