From c469211e532091d55ab79c07acdcf736d918c12c Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Thu, 29 Feb 2024 01:27:22 +0800 Subject: [PATCH] Only enable webm for Safari 15 and 16 webm container is currently broken on Safari 17. Signed-off-by: nyanmisaka --- src/scripts/browserDeviceProfile.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 06afb088a8..51097a475b 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -619,12 +619,20 @@ export default function (options) { if (canPlayVp9) { mp4VideoCodecs.push('vp9'); - webmVideoCodecs.push('vp9'); + // webm support is unreliable on safari 17 + if (!browser.safari + || (browser.safari && browser.versionMajor >= 15 && browser.versionMajor < 17)) { + webmVideoCodecs.push('vp9'); + } } if (canPlayAv1(videoTestElement)) { mp4VideoCodecs.push('av1'); - webmVideoCodecs.push('av1'); + // webm support is unreliable on safari 17 + if (!browser.safari + || (browser.safari && browser.versionMajor >= 15 && browser.versionMajor < 17)) { + webmVideoCodecs.push('av1'); + } } if (canPlayVp8 || browser.tizen) {