From ad4705f70ba4963f02e42da172bc1f3d22e4068b Mon Sep 17 00:00:00 2001 From: RZCH-DX Date: Sun, 23 Feb 2025 22:00:21 +0100 Subject: [PATCH] Add Mac OS X to extractSampleOffset exception --- web/js/3las/fallback/formats/3las.formatreader.mpeg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/3las/fallback/formats/3las.formatreader.mpeg.js b/web/js/3las/fallback/formats/3las.formatreader.mpeg.js index 2774f37..a8b0c79 100644 --- a/web/js/3las/fallback/formats/3las.formatreader.mpeg.js +++ b/web/js/3las/fallback/formats/3las.formatreader.mpeg.js @@ -226,7 +226,7 @@ var AudioFormatReader_MPEG = /** @class */ (function (_super) { } if (Math.abs(firstGranulePlayTime - lastGranulePlayTime) <= delta) { // First and last granule are equal. We need to make an educated guess which one is present. - if (isIOS || isIPadOS) { + if (isIOS || isIPadOS || isMacOSX) { // I don't know why, but Apple does things differently. extractSampleOffset = Math.floor((decodedData.length - extractSampleCount) / 2); } @@ -316,4 +316,4 @@ var AudioFormatReader_MPEG = /** @class */ (function (_super) { // Slot size (MPEG unit of measurement) - use [layer] AudioFormatReader_MPEG.MPEG_slot_size = new Array(0, 1, 1, 4); // Rsvd, 3, 2, 1 return AudioFormatReader_MPEG; -}(AudioFormatReader)); \ No newline at end of file +}(AudioFormatReader));