diff --git a/src/components/canvas/players/image-player.ts b/src/components/canvas/players/image-player.ts index db47746d..f58eb52b 100644 --- a/src/components/canvas/players/image-player.ts +++ b/src/components/canvas/players/image-player.ts @@ -91,14 +91,13 @@ export class ImagePlayer extends Player { throw new Error("Image asset has no src to load."); } - const corsUrl = `${src}${src.includes("?") ? "&" : "?"}x-cors=1`; - const loadOptions: pixi.UnresolvedAsset = { src: corsUrl, crossorigin: "anonymous", data: {} }; - const texture = await this.edit.assetLoader.load>(corsUrl, loadOptions); + const loadOptions: pixi.UnresolvedAsset = { src, crossorigin: "anonymous", data: {} }; + const texture = await this.edit.assetLoader.load>(src, loadOptions); if (!(texture?.source instanceof pixi.ImageSource)) { if (texture) { texture.destroy(true); - await this.edit.assetLoader.rejectAsset(corsUrl); + await this.edit.assetLoader.rejectAsset(src); } throw new Error(`Invalid image source '${src}'.`); } diff --git a/src/components/canvas/players/image-to-video-player.ts b/src/components/canvas/players/image-to-video-player.ts index d377f13f..a6660de1 100644 --- a/src/components/canvas/players/image-to-video-player.ts +++ b/src/components/canvas/players/image-to-video-player.ts @@ -114,14 +114,13 @@ export class ImageToVideoPlayer extends Player { private async tryLoadTexture(src: string): Promise { try { - const corsUrl = `${src}${src.includes("?") ? "&" : "?"}x-cors=1`; - const loadOptions: pixi.UnresolvedAsset = { src: corsUrl, crossorigin: "anonymous", data: {} }; - const texture = await this.edit.assetLoader.load>(corsUrl, loadOptions); + const loadOptions: pixi.UnresolvedAsset = { src, crossorigin: "anonymous", data: {} }; + const texture = await this.edit.assetLoader.load>(src, loadOptions); if (!(texture?.source instanceof pixi.ImageSource)) { if (texture) { texture.destroy(true); - await this.edit.assetLoader.rejectAsset(corsUrl); + await this.edit.assetLoader.rejectAsset(src); } return false; } diff --git a/src/components/canvas/players/video-player.ts b/src/components/canvas/players/video-player.ts index 5399aa63..33334a48 100644 --- a/src/components/canvas/players/video-player.ts +++ b/src/components/canvas/players/video-player.ts @@ -178,12 +178,11 @@ export class VideoPlayer extends Player { throw new Error(`Video source '${src}' is not supported. .mov files cannot be played in the browser. Please convert to .webm or .mp4 first.`); } - const corsUrl = `${src}${src.includes("?") ? "&" : "?"}x-cors=1`; - const loadOptions: pixi.UnresolvedAsset = { src: corsUrl, data: { autoPlay: false, muted: false } }; + const loadOptions: pixi.UnresolvedAsset = { src, data: { autoPlay: false, muted: false } }; // Use unique loader to create independent video element per player // This prevents conflicts when multiple clips use the same video source - const texture = await this.edit.assetLoader.loadVideoUnique(corsUrl, loadOptions); + const texture = await this.edit.assetLoader.loadVideoUnique(src, loadOptions); if (!texture || !(texture.source instanceof pixi.VideoSource)) { throw new Error(`Invalid video source '${src}'.`);