UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

28 lines 921 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CallOrigin = void 0; const api_1 = require("../../ocra/api"); const OutboundCall_1 = require("../OutboundCall"); class CallOrigin { constructor(call, localUserId) { this.call = call; this.localUserId = localUserId; this.originDomain = this.call instanceof OutboundCall_1.OutboundCall ? api_1.Domain.Mxp : this.call.remoteDomain; this.originUser = this.call instanceof OutboundCall_1.OutboundCall ? this.localUserId : this.call.remoteUserId; } getOrigin() { if (!this.originDomain || !this.originUser) { return undefined; } return { domain: this.originDomain, identity: this.originUser, }; } } exports.CallOrigin = CallOrigin; //# sourceMappingURL=CallOrigin.js.map