@skyway-sdk/core
Version:
The official Next Generation JavaScript SDK for SkyWay
21 lines • 659 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataChannelNegotiationLabel = void 0;
class DataChannelNegotiationLabel {
constructor(publicationId, streamId) {
this.publicationId = publicationId;
this.streamId = streamId;
}
static fromLabel(label) {
const { p, s } = JSON.parse(label);
return new DataChannelNegotiationLabel(p, s);
}
toLabel() {
return JSON.stringify({
p: this.publicationId,
s: this.streamId,
});
}
}
exports.DataChannelNegotiationLabel = DataChannelNegotiationLabel;
//# sourceMappingURL=datachannel.js.map