Furthe addressing comments on PR.

This commit is contained in:
Valera Rozuvan
2013-10-03 16:50:23 +03:00
parent 05eb13f086
commit 3b7cc6a419
6 changed files with 21 additions and 27 deletions

View File

@@ -12,7 +12,6 @@
data-autoplay="False"
data-yt-test-timeout="1500"
data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/"
data-autohide-html5="True"
>
<div class="focus_grabber first"></div>

View File

@@ -15,7 +15,6 @@
data-autoplay="False"
data-yt-test-timeout="1500"
data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/"
data-autohide-html5="True"
>
<div class="focus_grabber first"></div>

View File

@@ -15,7 +15,6 @@
data-autoplay="False"
data-yt-test-timeout="1500"
data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/"
data-autohide-html5="True"
>
<div class="focus_grabber first"></div>

View File

@@ -12,7 +12,6 @@
data-autoplay="False"
data-yt-test-timeout="1500"
data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/"
data-autohide-html5="True"
>
<div class="focus_grabber first"></div>

View File

@@ -12,7 +12,6 @@
data-autoplay="False"
data-yt-test-timeout="1500"
data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/"
data-autohide-html5="True"
>
<div class="focus_grabber first"></div>

View File

@@ -153,34 +153,33 @@ function () {
);
if ((this.videoType === 'html5') && (this.config.autohideHtml5)) {
this.el.on('mousemove', this.videoCaption.autoShowCaptions);
this.el.on('keydown', this.videoCaption.autoShowCaptions);
this.el.on({
mousemove, this.videoCaption.autoShowCaptions,
keydown, this.videoCaption.autoShowCaptions
});
// Moving slider on subtitles is not a mouse move,
// but captions and controls should be shown.
this.videoCaption.subtitlesEl.on(
'scroll', this.videoCaption.autoShowCaptions
);
this.videoCaption.subtitlesEl.on(
'scroll', this.videoControl.showControls
);
this.videoCaption.subtitlesEl
.on(
'scroll', this.videoCaption.autoShowCaptions
)
.on(
'scroll', this.videoControl.showControls
);
} else if (!this.config.autohideHtml5) {
this.videoCaption.subtitlesEl.on(
'keydown', this.videoCaption.autoShowCaptions
);
this.videoCaption.subtitlesEl.on({
keydown: this.videoCaption.autoShowCaptions,
this.videoCaption.hideSubtitlesEl.on(
'mousemove', this.videoCaption.autoShowCaptions
);
this.videoCaption.hideSubtitlesEl.on(
'keydown', this.videoCaption.autoShowCaptions
);
// Moving slider on subtitles is not a mouse move,
// but captions should not be auto-hidden.
scroll: this.videoCaption.autoShowCaptions
});
// Moving slider on subtitles is not a mouse move,
// but captions should not be auto-hidden.
this.videoCaption.subtitlesEl.on(
'scroll', this.videoCaption.autoShowCaptions
);
this.videoCaption.hideSubtitlesEl.on({
mousemove: this.videoCaption.autoShowCaptions,
keydown: this.videoCaption.autoShowCaptions
});
}
}