Commit deb0ad49 by Valera Rozuvan

Enabling showing of captions always when mouse is over CC.

parent 20c2b3dc
...@@ -392,7 +392,7 @@ div.video { ...@@ -392,7 +392,7 @@ div.video {
@include transition(none); @include transition(none);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
width: 30px; width: 30px;
&:hover, &:active { &:hover, &:active {
background-color: #444; background-color: #444;
color: #fff; color: #fff;
...@@ -457,7 +457,7 @@ div.video { ...@@ -457,7 +457,7 @@ div.video {
text-indent: -9999px; text-indent: -9999px;
@include transition(none); @include transition(none);
width: 30px; width: 30px;
&:hover, &:active { &:hover, &:active {
background-color: #444; background-color: #444;
color: #fff; color: #fff;
...@@ -611,7 +611,6 @@ div.video { ...@@ -611,7 +611,6 @@ div.video {
ol.subtitles { ol.subtitles {
width: 0; width: 0;
height: 0; height: 0;
visibility: hidden;
} }
ol.subtitles.html5 { ol.subtitles.html5 {
...@@ -645,7 +644,6 @@ div.video { ...@@ -645,7 +644,6 @@ div.video {
ol.subtitles { ol.subtitles {
right: -(flex-grid(4)); right: -(flex-grid(4));
width: auto; width: auto;
visibility: hidden;
} }
} }
......
...@@ -170,15 +170,22 @@ function () { ...@@ -170,15 +170,22 @@ function () {
} else if (!this.config.autohideHtml5) { } else if (!this.config.autohideHtml5) {
this.videoCaption.subtitlesEl.on({ this.videoCaption.subtitlesEl.on({
keydown: this.videoCaption.autoShowCaptions, keydown: this.videoCaption.autoShowCaptions,
focus: this.videoCaption.autoShowCaptions,
// Moving slider on subtitles is not a mouse move, but captions // Moving slider on subtitles is not a mouse move, but captions
// should not be auto-hidden. // should not be auto-hidden.
scroll: this.videoCaption.autoShowCaptions scroll: this.videoCaption.autoShowCaptions,
mouseout: this.videoCaption.autoHideCaptions,
blur: this.videoCaption.autoHideCaptions
}); });
this.videoCaption.hideSubtitlesEl.on({ this.videoCaption.hideSubtitlesEl.on({
mousemove: this.videoCaption.autoShowCaptions, mousemove: this.videoCaption.autoShowCaptions,
keydown: this.videoCaption.autoShowCaptions focus: this.videoCaption.autoShowCaptions,
mouseout: this.videoCaption.autoHideCaptions,
blur: this.videoCaption.autoHideCaptions
}); });
} }
} }
...@@ -272,10 +279,12 @@ function () { ...@@ -272,10 +279,12 @@ function () {
clearTimeout(this.captionHideTimeout); clearTimeout(this.captionHideTimeout);
} }
this.captionHideTimeout = setTimeout( if (this.config.autohideHtml5) {
this.videoCaption.autoHideCaptions, this.captionHideTimeout = setTimeout(
this.videoCaption.fadeOutTimeout this.videoCaption.autoHideCaptions,
); this.videoCaption.fadeOutTimeout
);
}
this.captionsShowLock = false; this.captionsShowLock = false;
} }
...@@ -502,6 +511,8 @@ function () { ...@@ -502,6 +511,8 @@ function () {
// forward out of the captions. // forward out of the captions.
if (captionIndex === 0 || if (captionIndex === 0 ||
captionIndex === this.videoCaption.captions.length-1) { captionIndex === this.videoCaption.captions.length-1) {
this.videoCaption.autoHideCaptions();
this.videoCaption.autoScrolling = true; this.videoCaption.autoScrolling = true;
} }
} }
......
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