FIX: Video playback on iOS (#25513)

This commit is contained in:
Blake Erickson 2024-01-31 20:09:57 -07:00
parent ef94de52d9
commit aac6036868

View File

@ -54,7 +54,16 @@ export default {
});
video.addEventListener("canplay", function () {
video.play();
if (caps.isIOS) {
// This is needed to fix video playback on iOS.
// Without it, videos will play, but they won't always be visible.
discourseLater(() => {
video.play();
}, 100);
} else {
video.play();
}
wrapper.remove();
video.style.display = "";
parentDiv.classList.remove("video-placeholder-container");