diff --git a/src/gui/Player.ts b/src/gui/Player.ts index 0a59716a..59d93183 100644 --- a/src/gui/Player.ts +++ b/src/gui/Player.ts @@ -145,9 +145,8 @@ class Player extends EventEmitter { this.useExternalTransport = () => { // eslint-disable-next-line no-restricted-globals - const useExternal = - new URLSearchParams(parent.location.search).getAll("noUi") - .length > 0 || this._controller.options?.noUi + const useExternal = + getSetting("noUi") === "true" || this._controller.options?.noUi if (useExternal === undefined) return false return useExternal } diff --git a/src/utils.ts b/src/utils.ts index ba7342ff..6a7f9ccc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -87,6 +87,7 @@ export const getCurrentUrl = () => { return window.location.href } export const getVariableOverrides = () => { + if (inSMPWrapper) return []; const varNames = new URLSearchParams(window.location.search).getAll( "varName", )