Fix video in detail page not playing (#679)

This commit is contained in:
redphx
2025-02-21 06:55:55 +07:00
parent 43a66db697
commit 3b2abbf6bb
3 changed files with 4 additions and 4 deletions

View File

@@ -9556,7 +9556,7 @@ function patchVideoApi() {
return nativePlay.apply(this);
}
let $parent = this.parentElement;
if (!this.src && $parent.dataset.testid === "media-container") this.addEventListener("loadedmetadata", showFunc, { once: !0 });
if (!this.src && $parent?.dataset.testid === "media-container") this.addEventListener("loadedmetadata", showFunc, { once: !0 });
return nativePlay.apply(this);
};
}