mediasoup
Version:
Cutting Edge WebRTC Video Conferencing
61 lines (60 loc) • 2.58 kB
JavaScript
;
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloseWebRtcServerRequestT = exports.CloseWebRtcServerRequest = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const flatbuffers = require("flatbuffers");
class CloseWebRtcServerRequest {
bb = null;
bb_pos = 0;
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCloseWebRtcServerRequest(bb, obj) {
return (obj || new CloseWebRtcServerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCloseWebRtcServerRequest(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CloseWebRtcServerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
webRtcServerId(optionalEncoding) {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCloseWebRtcServerRequest(builder) {
builder.startObject(1);
}
static addWebRtcServerId(builder, webRtcServerIdOffset) {
builder.addFieldOffset(0, webRtcServerIdOffset, 0);
}
static endCloseWebRtcServerRequest(builder) {
const offset = builder.endObject();
builder.requiredField(offset, 4); // web_rtc_server_id
return offset;
}
static createCloseWebRtcServerRequest(builder, webRtcServerIdOffset) {
CloseWebRtcServerRequest.startCloseWebRtcServerRequest(builder);
CloseWebRtcServerRequest.addWebRtcServerId(builder, webRtcServerIdOffset);
return CloseWebRtcServerRequest.endCloseWebRtcServerRequest(builder);
}
unpack() {
return new CloseWebRtcServerRequestT(this.webRtcServerId());
}
unpackTo(_o) {
_o.webRtcServerId = this.webRtcServerId();
}
}
exports.CloseWebRtcServerRequest = CloseWebRtcServerRequest;
class CloseWebRtcServerRequestT {
webRtcServerId;
constructor(webRtcServerId = null) {
this.webRtcServerId = webRtcServerId;
}
pack(builder) {
const webRtcServerId = (this.webRtcServerId !== null ? builder.createString(this.webRtcServerId) : 0);
return CloseWebRtcServerRequest.createCloseWebRtcServerRequest(builder, webRtcServerId);
}
}
exports.CloseWebRtcServerRequestT = CloseWebRtcServerRequestT;