Skip to content

Commit 37d9b00

Browse files
committed
Fix video playback in Chrome and Epiphany
1 parent 625c690 commit 37d9b00

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

_posts/2025-11-14-october-in-servo.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,19 @@ For more details, head to our [Sponsorship page]({{ '/sponsorship/' | url }}).
171171
(function makeVideoPlayersClickable() {
172172
addEventListener("toggle", event => {
173173
const details = event.target.closest("details");
174-
console.log(details, details.open);
175174
if (!details?.open) {
176175
return;
177176
}
178177
const video = details.querySelector("video");
179-
video?.fastSeek(0);
180-
video?.play();
181-
console.log(details, video);
178+
if (!video) {
179+
return;
180+
}
181+
if (video.fastSeek) {
182+
video.fastSeek(0);
183+
} else {
184+
video.currentTime = 0;
185+
}
186+
video.play();
182187
}, true);
183188
})();
184189
</script>

0 commit comments

Comments
 (0)