mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-02 09:41:07 +00:00
fix error when restarting player with same video
This commit is contained in:
parent
88ebb6d648
commit
bf0b07f3d7
@ -349,7 +349,10 @@ function removePlayer() {
|
|||||||
if (playerElement.hasChildNodes()) {
|
if (playerElement.hasChildNodes()) {
|
||||||
var youtubeId = playerElement.childNodes[0].getAttribute("data-id");
|
var youtubeId = playerElement.childNodes[0].getAttribute("data-id");
|
||||||
var playedStatus = document.createDocumentFragment();
|
var playedStatus = document.createDocumentFragment();
|
||||||
playedStatus.appendChild(document.getElementById(youtubeId));
|
var playedBox = document.getElementById(youtubeId);
|
||||||
|
if (playedBox) {
|
||||||
|
playedStatus.appendChild(playedBox);
|
||||||
|
};
|
||||||
playerElement.innerHTML = '';
|
playerElement.innerHTML = '';
|
||||||
// append played status
|
// append played status
|
||||||
var videoInfo = document.getElementById('video-info-' + youtubeId);
|
var videoInfo = document.getElementById('video-info-' + youtubeId);
|
||||||
|
Loading…
Reference in New Issue
Block a user