fix(player): resolve Safari infinite loading by refining play overlay and loading logic

This commit is contained in:
Michael committed 2026-03-09 23:05:10 +01:00
1 parent dbb6559640
commit a256ca87b6
3 files changed
+14 -10

No files matched your search

+4 -2
View File
@@ -205,7 +205,6 @@
video.addEventListener('pause', () => {
window.parent.postMessage({ type: 'playback_status', status: 'paused' }, '*');
if (loading.style.display === 'none') playOverlay.style.display = 'flex';
});
video.addEventListener('playing', () => {
@@ -242,7 +241,10 @@
if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = url;
video.load();
video.play().catch(() => playOverlay.style.display = 'flex');
video.play().catch(() => {
loading.style.display = 'none';
playOverlay.style.display = 'flex';
});
return true;
}
return false;