mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 19:52:17 +08:00
FIX: Video playback on iOS (#25513)
This commit is contained in:
parent
ef94de52d9
commit
aac6036868
@ -54,7 +54,16 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
video.addEventListener("canplay", function () {
|
video.addEventListener("canplay", function () {
|
||||||
|
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();
|
video.play();
|
||||||
|
}, 100);
|
||||||
|
} else {
|
||||||
|
video.play();
|
||||||
|
}
|
||||||
|
|
||||||
wrapper.remove();
|
wrapper.remove();
|
||||||
video.style.display = "";
|
video.style.display = "";
|
||||||
parentDiv.classList.remove("video-placeholder-container");
|
parentDiv.classList.remove("video-placeholder-container");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user