sinch-rtc
Version:
RTC JavaScript/Web SDK
29 lines • 710 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Sdp = void 0;
const SdpTranform = require("sdp-transform");
class Sdp {
static parse(sdp) {
return new Sdp(SdpTranform.parse(sdp));
}
constructor(description) {
this.description = description;
}
getMedia(type) {
return this.description.media.find((m) => m.type == type);
}
get video() {
return this.getMedia("video");
}
get audio() {
return this.getMedia("audio");
}
hasAudio() {
return this.audio != undefined;
}
hasVideo() {
return this.video != undefined;
}
}
exports.Sdp = Sdp;
//# sourceMappingURL=Sdp.js.map