From d1be0f2d4a94182d0772f3aaf3d7c9cae4967b06 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 22 Sep 2020 04:34:40 -0700 Subject: [PATCH] oops, add a missing assetProxy call! --- src/app/components/OutfitCanvas.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/components/OutfitCanvas.js b/src/app/components/OutfitCanvas.js index 14fd022..95d09dc 100644 --- a/src/app/components/OutfitCanvas.js +++ b/src/app/components/OutfitCanvas.js @@ -207,7 +207,12 @@ export function OutfitCanvasMovie({ librarySrc, zIndex }) { } async function addMovieClip() { - library = await loadMovieLibrary(librarySrc); + try { + library = await loadMovieLibrary(librarySrc); + } catch (e) { + console.error("Error loading movie library", librarySrc, e); + } + let constructorName; try { const fileName = librarySrc.split("/").pop(); @@ -369,7 +374,7 @@ async function loadMovieLibrary(librarySrc) { // scripts will trigger their onloads in order of arrival, and my // _hope_ is that the onload will execute before the next script to // arrive executes. Let's, ah, find out! - await loadScriptTag(librarySrc); + await loadScriptTag(safeImageUrl(librarySrc)); const composition = Object.values(window.AdobeAn.compositions).pop(); const library = composition.getLibrary(); @@ -384,9 +389,7 @@ async function loadMovieLibrary(librarySrc) { const manifestImages = new Map( library.properties.manifest.map(({ id, src }) => [ id, - loadImage(safeImageUrl(librarySrcDir + "/" + src)).catch((e) => { - console.error("Error loading image for movie manifest", e); - }), + loadImage(safeImageUrl(librarySrcDir + "/" + src)), ]) ); await Promise.all(manifestImages.values());