@christianriedl/media 1.0.97 → 1.0.98

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -395,13 +395,15 @@
395
395
  nameTimer = window.setTimeout(() => { onLoad(item); }, 200);
396
396
  }
397
397
  function onLoad(item: IPictureFile) { // img loaded or cached
398
- if (item.blob && item.blob.startsWith("blob")) {
399
- window.URL.revokeObjectURL(item.blob);
400
- }
401
- const next = index.value + 1;
402
- if (next < items.length && next > nextIndex) {
403
- nextIndex = next;
404
- createBlob (items[nextIndex]);
398
+ if (mediaAppConfig.useImagePreload) {
399
+ if (item.blob && item.blob.startsWith("blob")) {
400
+ window.URL.revokeObjectURL(item.blob);
401
+ }
402
+ const next = index.value + 1;
403
+ if (next < items.length && next > nextIndex) {
404
+ nextIndex = next;
405
+ createBlob(items[nextIndex]);
406
+ }
405
407
  }
406
408
  clearName();
407
409
  const idx = item.Url.lastIndexOf('.');