Skip to content

Commit 7fa35f2

Browse files
n0samurelrelb
authored andcommitted
web: Construct relative SWF URLs using document base
1 parent c0e84e6 commit 7fa35f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/packages/core/src/ruffle-player.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ export class RufflePlayer extends HTMLElement {
589589

590590
if ("url" in options) {
591591
console.log(`Loading SWF file ${options.url}`);
592-
this.swfUrl = new URL(options.url, document.location.href);
592+
this.swfUrl = new URL(options.url, document.baseURI);
593593

594594
const parameters = {
595595
...sanitizeParameters(

0 commit comments

Comments
 (0)