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.
20 lines (19 loc) • 546 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const rtlayer_client_1 = require("rtlayer-client");
const oid = "lyvSfW7uPPolwax0BHMC";
const sid = "al1VcGWrpvxciFQSaKOQ";
let isOpen = false;
const rtlayer = (0, rtlayer_client_1.default)(oid, sid);
rtlayer.on("open", () => {
isOpen = true;
console.log("RTLayer connection opened");
});
rtlayer.on("close", () => {
isOpen = false;
console.log("RTLayer connection closed");
});
rtlayer.isOpen = () => {
return isOpen;
};
exports.default = rtlayer;