@sumaris-net/ngx-components 2.4.72 → 2.4.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10548,6 +10548,7 @@ class AudioProvider extends StartableService {
10548
10548
  console.info(`[audio] Preloading sound '${sound.assetId}', from file '${assetPath}'...`);
10549
10549
  try {
10550
10550
  if (this._audioType === 'native') {
10551
+ this._preloadedSounds[sound.assetId] = sound;
10551
10552
  await NativeAudio.preload({
10552
10553
  audioChannelNum: 1,
10553
10554
  isUrl: false,
@@ -10557,9 +10558,9 @@ class AudioProvider extends StartableService {
10557
10558
  }
10558
10559
  else {
10559
10560
  this._htmlAudioCache[sound.assetId] = new Audio(assetPath);
10561
+ this._preloadedSounds[sound.assetId] = sound;
10560
10562
  }
10561
10563
  // Add to map
10562
- this._preloadedSounds[sound.assetId] = sound;
10563
10564
  console.info(`[audio] Preloading sound '${sound.assetId}' [OK]`);
10564
10565
  }
10565
10566
  catch (err) {
@@ -10568,6 +10569,7 @@ class AudioProvider extends StartableService {
10568
10569
  console.info(`[audio] Preloading sound '${sound.assetId}': Skipped (${errorMsg})`);
10569
10570
  }
10570
10571
  else {
10572
+ this._preloadedSounds[sound.assetId] = null;
10571
10573
  console.error(`[audio] Unable to preload sound '${sound.assetId}', from file '${assetPath}': ${errorMsg}\n${err?.originalStack || ''}`);
10572
10574
  throw err;
10573
10575
  }