Fix: Change text on playback speed

This commit is contained in:
Preston 2018-03-07 20:27:04 -05:00
parent dbb3a6a20d
commit 086d4d42a5
2 changed files with 3 additions and 2 deletions

View File

@ -216,7 +216,7 @@ function playVideo(videoId) {
dateString = [dateString.slice(0, 7), '-', dateString.slice(7)].join('');
console.log(dateString);
const publishedDate = dateFormat(dateString, "mmm dS, yyyy");
// Figure out the width for the like/dislike bar.
const videoLikes = info['like_count'];
const videoDislikes = info['dislike_count'];
@ -594,6 +594,7 @@ function changeQuality(videoHtml, qualityType, isEmbed = false) {
* @return {Void}
*/
function changeVideoSpeed(speed){
$('#currentSpeed').html(speed);
$('.videoPlayer').get(0).playbackRate = speed;
}

View File

@ -14,7 +14,7 @@
</div>
</div>
<div class='smallButton videoSpeed'>
<span id='currentSpeed'>1x</span> <i class="fas fa-angle-down"></i>
<span id='currentSpeed'>1</span>x <i class="fas fa-angle-down"></i>
<div class='speedTypes'>
<ul>
<li onclick='changeVideoSpeed(0.25)'>0.25x</li>