15 lines
395 B
JavaScript
15 lines
395 B
JavaScript
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;
|
|
}
|