Files
webRtc/WebApp/client/public/js/config.js

15 lines
395 B
JavaScript
Raw Normal View History

2026-02-27 18:35:40 +08:00
import {getServers} from "./icesettings.js";
export async function getServerConfig() {
const protocolEndPoint = location.origin + '/config';
const createResponse = await fetch(protocolEndPoint);
return await createResponse.json();
}
export function getRTCConfiguration() {
let config = {};
config.sdpSemantics = 'unified-plan';
config.iceServers = getServers();
return config;
}