noid,
playlist();
$(function() {
var currentVideo = document.querySelector('.play');
var paused = 'paused' in localStorage;
if(paused == 'false') {
currentVideo.play();
$('.video-control').addClass('video-control_active');
}
$('.video-control').on('click', function () {
$(this).toggleClass('video-control_active');
if (currentVideo.paused) {
currentVideo.play();
localStorage.paused = 'false'
} else {
currentVideo.pause();
localStorage.paused = 'true'
}
})
});
заменить на
if(localStorage.paused !== 'true') playlist();
$('.video-control').on('click', function () {
$(this).toggleClass('video-control_active');
var currentVideo = document.querySelector('.play');
if (currentVideo && currentVideo.paused) {
currentVideo.play();
localStorage.paused = 'false'
} else {
currentVideo.pause();
localStorage.paused = 'true'
}
})