mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 15:35:12 +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.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