fix: WASM import path respects __WZP_BASE_URL for cross-origin loading
When variant JS is loaded from featherChat (different origin), WASM imports need to resolve via the /audio/ Caddy path, not root /. All 4 variant files now use: (window.__WZP_BASE_URL || '') + '/wasm/...' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const WZP_WASM_PATH = '/wasm/wzp_wasm.js';
|
||||
const WZP_WASM_PATH = (window.__WZP_BASE_URL || '') + '/wasm/wzp_wasm.js';
|
||||
|
||||
// 12-byte MediaHeader size (matches wzp-proto MediaHeader::WIRE_SIZE).
|
||||
const MEDIA_HEADER_SIZE = 12;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
'use strict';
|
||||
|
||||
// WASM module path (served from /wasm/ by the wzp-web bridge).
|
||||
const WZP_WASM_PATH = '/wasm/wzp_wasm.js';
|
||||
const WZP_WASM_PATH = (window.__WZP_BASE_URL || '') + '/wasm/wzp_wasm.js';
|
||||
|
||||
class WZPHybridClient {
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
'use strict';
|
||||
|
||||
// WASM module path (served from /wasm/ by the wzp-web bridge).
|
||||
const WZP_WS_FEC_WASM_PATH = '/wasm/wzp_wasm.js';
|
||||
const WZP_WS_FEC_WASM_PATH = (window.__WZP_BASE_URL || '') + '/wasm/wzp_wasm.js';
|
||||
|
||||
// 12-byte MediaHeader size (matches wzp-proto MediaHeader::WIRE_SIZE).
|
||||
const WZP_WS_FEC_HEADER_SIZE = 12;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
'use strict';
|
||||
|
||||
// WASM module path (served from /wasm/ by the wzp-web bridge).
|
||||
const WZP_WS_FULL_WASM_PATH = '/wasm/wzp_wasm.js';
|
||||
const WZP_WS_FULL_WASM_PATH = (window.__WZP_BASE_URL || '') + '/wasm/wzp_wasm.js';
|
||||
|
||||
// 12-byte MediaHeader size (matches wzp-proto MediaHeader::WIRE_SIZE).
|
||||
const WZP_WS_FULL_HEADER_SIZE = 12;
|
||||
|
||||
Reference in New Issue
Block a user