Fix everything
This commit is contained in:
parent
750dac8d9d
commit
e23657144a
1 changed files with 5 additions and 13 deletions
|
|
@ -2,7 +2,6 @@ import {
|
||||||
SetTransport,
|
SetTransport,
|
||||||
registerRemoteListener
|
registerRemoteListener
|
||||||
} from "@mercuryworkshop/bare-mux";
|
} from "@mercuryworkshop/bare-mux";
|
||||||
import { isIOS } from "./IosDetector";
|
|
||||||
|
|
||||||
function changeTransport(transport: string, wispUrl: string) {
|
function changeTransport(transport: string, wispUrl: string) {
|
||||||
switch (transport) {
|
switch (transport) {
|
||||||
|
|
@ -46,17 +45,10 @@ const wispUrl =
|
||||||
"/wisp/";
|
"/wisp/";
|
||||||
registerRemoteListener(navigator.serviceWorker.controller!);
|
registerRemoteListener(navigator.serviceWorker.controller!);
|
||||||
|
|
||||||
if (isIOS) {
|
|
||||||
console.log("iOS device detected. Bare will be used.");
|
changeTransport(
|
||||||
changeTransport(
|
|
||||||
localStorage.getItem("transport") || "libcurl",
|
localStorage.getItem("transport") || "libcurl",
|
||||||
localStorage.getItem("wispUrl") || wispUrl
|
localStorage.getItem("wispUrl") || wispUrl
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
changeTransport(
|
|
||||||
localStorage.getItem("transport") || "bare",
|
|
||||||
localStorage.getItem("wispUrl") || wispUrl
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export { changeTransport, getTransport };
|
export { changeTransport, getTransport };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue