Skip to content

Commit e6503ba

Browse files
committed
Use progress event instead of canplay to adjust for iOS
1 parent 3b27a00 commit e6503ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/handlebars/layout.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
scale: 0;
331331
}
332332
333-
&.loading::after {
333+
&.loading::after, &:buffering::after {
334334
content: url('/static/loading.svg');
335335
}
336336
}

src/main/js/lightbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Lightbox {
6464

6565
// Simulate :playing pseudo-class
6666
const $video = $display.querySelector('video');
67-
$video.addEventListener('canplay', e => $display.classList.remove('loading'));
67+
$video.addEventListener('progress', e => $display.classList.remove('loading'));
6868
$video.addEventListener('play', e => $display.classList.add('playing'));
6969
$video.addEventListener('pause', e => $display.classList.remove('playing'));
7070
$video.addEventListener('ended', e => $display.classList.remove('playing'));

0 commit comments

Comments
 (0)