scroll the nextVideo into the top

This commit is contained in:
diogo 2021-07-17 19:43:51 +02:00
parent ad9f210135
commit d6485b2291
No known key found for this signature in database
GPG Key ID: ED45B7CCDB979B99

View File

@ -149,6 +149,8 @@ function get_playlist(plid, retries) {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
playlist.innerHTML = xhr.response.playlistHtml;
var nextVideo = document.getElementById(xhr.response.nextVideo);
nextVideo.parentNode.parentNode.scrollTop = nextVideo.offsetTop;
if (xhr.response.nextVideo) {
player.on('ended', function () {