mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-15 03:51:18 +00:00
- Update trystero to v0.23.0
- Add dockerfile for CLI - Change relay image for testing on arm64
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
import polyfill from "node-datachannel/polyfill";
|
||||
import * as polyfill from "werift";
|
||||
import { main } from "./main";
|
||||
|
||||
for (const prop in polyfill) {
|
||||
// @ts-ignore Applying polyfill to globalThis
|
||||
globalThis[prop] = (polyfill as any)[prop];
|
||||
const rtcPolyfillCtor = (polyfill as any).RTCPeerConnection;
|
||||
if (typeof (globalThis as any).RTCPeerConnection === "undefined" && typeof rtcPolyfillCtor === "function") {
|
||||
// Fill only the standard WebRTC global in Node CLI runtime.
|
||||
(globalThis as any).RTCPeerConnection = rtcPolyfillCtor;
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user