fix simple-peer import

This commit is contained in:
Lukas Hass 2022-02-01 00:34:48 +01:00
parent 1b41e794da
commit 446aa6cbe3
No known key found for this signature in database
GPG Key ID: 7C8CEF72C4039178
2 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,9 @@ import { Readable, readable, writable, Writable } from "svelte/store";
import { getIceServersConfig } from "../Components/Video/utils";
import { highlightedEmbedScreen } from "../Stores/EmbedScreensStore";
import { isMediaBreakpointUp } from "../Utils/BreakpointsUtils";
import Peer from "simple-peer";
const Peer: SimplePeerNamespace.SimplePeer = require("simple-peer");
// const { default: Peer } = await import("simple-peer");
/**
* A peer connection used to transmit video / audio signals between 2 peers.

View File

@ -10,8 +10,9 @@ import { playersStore } from "../Stores/PlayersStore";
import { chatMessagesStore, newChatMessageSubject } from "../Stores/ChatStore";
import { getIceServersConfig } from "../Components/Video/utils";
import { isMediaBreakpointUp } from "../Utils/BreakpointsUtils";
import Peer from "simple-peer";
const Peer: SimplePeerNamespace.SimplePeer = require("simple-peer");
// const { default: Peer } = await import("simple-peer");
export type PeerStatus = "connecting" | "connected" | "error" | "closed";