Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC ICE servers configuration option. #214

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,169 changes: 1,209 additions & 5,960 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vircadia-web",
"version": "2023.1.5",
"version": "2024.1.0",
"description": "Vircadia open source metaverse web interface for agent-based virtual worlds.",
"productName": "Vircadia Web",
"author": "DigiSomni LLC | Vircadia Contributors",
Expand All @@ -24,7 +24,7 @@
"@babylonjs/inspector": "^6.24.0",
"@babylonjs/loaders": "^6.24.0",
"@quasar/extras": "^1.0.0",
"@vircadia/web-sdk": "^2023.1.2",
"@vircadia/web-sdk": "^2024.1.0",
"@vueuse/core": "^10.1.2",
"ammojs-typed": "^1.0.6",
"dompurify": "^3.0.3",
Expand Down Expand Up @@ -73,4 +73,3 @@
"Julien Merzoug <[email protected]>"
]
}

1 change: 1 addition & 0 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module.exports = configure(function(ctx) {
env: {
// Default Connection Config
VRCA_DEFAULT_METAVERSE_URL: process.env.VRCA_DEFAULT_METAVERSE_URL ?? "https://metaverse.vircadia.com/live",
VRCA_DEFAULT_ICE_SERVERS: process.env.VRCA_DEFAULT_ICE_SERVERS ?? '[ { "urls": ["stun:stun1.l.google.com:19302", "stun:stun4.l.google.com:19302"] } ]',
VRCA_DEFAULT_DOMAIN_PROTOCOL: process.env.VRCA_DEFAULT_DOMAIN_PROTOCOL ?? "wss:",
VRCA_DEFAULT_DOMAIN_PORT: process.env.VRCA_DEFAULT_DOMAIN_PORT ?? "40102",
VRCA_DEFAULT_DOMAIN_URL: process.env.VRCA_DEFAULT_DOMAIN_URL ?? "wss://antares.digisomni.com/0,0,0/0,0,0,1",
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ declare namespace NodeJS {
VUE_ROUTER_MODE: "hash" | "history" | "abstract" | undefined;
VUE_ROUTER_BASE: string | undefined;
VRCA_DEFAULT_METAVERSE_URL: string;
VRCA_DEFAULT_ICE_SERVERS: string;
VRCA_DEFAULT_DOMAIN_PROTOCOL: string;
VRCA_DEFAULT_DOMAIN_PORT: string;
VRCA_DEFAULT_DOMAIN_URL: string;
Expand Down
5 changes: 3 additions & 2 deletions src/modules/domain/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Allow getters to be compact.
/* eslint-disable @typescript-eslint/brace-style */

import { DomainServer, SignalEmitter, Camera, EntityServer } from "@vircadia/web-sdk";
import { DomainServer, SignalEmitter, Camera, EntityServer, IceServerConfig } from "@vircadia/web-sdk";
import { Account } from "@Modules/account";
import { DomainAudioClient } from "@Modules/domain/audio";
import { DomainMessageClient } from "@Modules/domain/message";
Expand Down Expand Up @@ -135,7 +135,8 @@ export class Domain {
}

Log.debug(Log.types.NETWORK, `Creating a new DomainServer.`);
this._domain = new DomainServer();
const iceServers = JSON.parse(applicationStore.defaultConnectionConfig.DEFAULT_ICE_SERVERS) as Array<IceServerConfig>;
this._domain = new DomainServer(iceServers);
this._domain.metaverseServerURL = this.getMetaverseUrl();
this._domain.account.authRequired.connect(() => {
console.debug("AUTH REQUIRED: Open login dialog");
Expand Down
1 change: 1 addition & 0 deletions src/stores/application-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const useApplicationStore = defineStore("application", {
},
defaultConnectionConfig: {
DEFAULT_METAVERSE_URL: process.env.VRCA_DEFAULT_METAVERSE_URL,
DEFAULT_ICE_SERVERS: process.env.VRCA_DEFAULT_ICE_SERVERS,
DEFAULT_DOMAIN_PROTOCOL: process.env.VRCA_DEFAULT_DOMAIN_PROTOCOL,
DEFAULT_DOMAIN_PORT: process.env.VRCA_DEFAULT_DOMAIN_PORT,
DEFAULT_DOMAIN_URL: process.env.VRCA_DEFAULT_DOMAIN_URL
Expand Down
Loading