msg91-webrtc-call
Version:
**msg91-webrtc-call** is a lightweight JavaScript SDK that enables you to easily add peer-to-peer WebRTC audio/video calling functionality to your web applications using the MSG91 infrastructure.
27 lines (26 loc) • 807 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setEnvironment = setEnvironment;
exports.getEnvironment = getEnvironment;
exports.getBaseURL = getBaseURL;
let environment = "prod";
function setEnvironment(env) {
environment = env;
}
function getEnvironment() {
return environment;
}
function getBaseURL() {
const env = getEnvironment();
switch (env) {
case "dev":
return "http://localhost:8080";
case "test":
return "https://dev-voice-api.rtlayer.com";
case "prod":
return "https://voice-api.rtlayer.com";
default:
return "https://voice-api.rtlayer.com";
}
return getEnvironment() == "prod" ? "https://voice-api.rtlayer.com" : "https://dev-voice-api.rtlayer.com";
}