* fix WebrtcProvider use localhost for dev
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "PORT=4444 npx y-webrtc & vite",
|
||||||
"build": "tsc --noEmit && vite build",
|
"build": "tsc --noEmit && vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ export function initSync(roomId: string): AppSync {
|
|||||||
? "connecting"
|
? "connecting"
|
||||||
: "offline";
|
: "offline";
|
||||||
|
|
||||||
const provider = new WebrtcProvider(roomId, doc);
|
const provider = new WebrtcProvider(roomId, doc,{
|
||||||
|
signaling: ["ws://localhost:4444", "ws://lynxpi.ddns.net:4444"]
|
||||||
|
});
|
||||||
const persistence = new IndexeddbPersistence(roomId, doc);
|
const persistence = new IndexeddbPersistence(roomId, doc);
|
||||||
|
|
||||||
const syncConnectionStatus = (status: ConnectionStatus) => {
|
const syncConnectionStatus = (status: ConnectionStatus) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user