mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: Video playback on iOS (#25513)
This commit is contained in:
parent
44f8418093
commit
969ab0fd6e
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user