diff --git a/src/libs/Sound/index.ts b/src/libs/Sound/index.ts index 6f55644dfbcd..35b13b58f90d 100644 --- a/src/libs/Sound/index.ts +++ b/src/libs/Sound/index.ts @@ -1,6 +1,8 @@ import {Howl} from 'howler'; import type {ValueOf} from 'type-fest'; +import getPlatform from '@libs/getPlatform'; import Log from '@libs/Log'; +import CONST from '@src/CONST'; import {getIsMuted, SOUNDS, withMinimalExecutionTime} from './BaseSound'; import config from './config'; @@ -10,6 +12,11 @@ function cacheSoundAssets() { return; } + // If this is Desktop app, Cache API wont work with app scheme + if (getPlatform() === CONST.PLATFORM.DESKTOP) { + return; + } + caches.open('sound-assets').then((cache) => { const soundFiles = Object.values(SOUNDS).map((sound) => `${config.prefix}${sound}.mp3`);