UNPKG

mediasoup

Version:

Cutting Edge WebRTC Video Conferencing

61 lines (60 loc) 2.54 kB
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify Object.defineProperty(exports, "__esModule", { value: true }); exports.CloseRtpObserverRequestT = exports.CloseRtpObserverRequest = 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 CloseRtpObserverRequest { bb = null; bb_pos = 0; __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsCloseRtpObserverRequest(bb, obj) { return (obj || new CloseRtpObserverRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsCloseRtpObserverRequest(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new CloseRtpObserverRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } rtpObserverId(optionalEncoding) { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } static startCloseRtpObserverRequest(builder) { builder.startObject(1); } static addRtpObserverId(builder, rtpObserverIdOffset) { builder.addFieldOffset(0, rtpObserverIdOffset, 0); } static endCloseRtpObserverRequest(builder) { const offset = builder.endObject(); builder.requiredField(offset, 4); // rtp_observer_id return offset; } static createCloseRtpObserverRequest(builder, rtpObserverIdOffset) { CloseRtpObserverRequest.startCloseRtpObserverRequest(builder); CloseRtpObserverRequest.addRtpObserverId(builder, rtpObserverIdOffset); return CloseRtpObserverRequest.endCloseRtpObserverRequest(builder); } unpack() { return new CloseRtpObserverRequestT(this.rtpObserverId()); } unpackTo(_o) { _o.rtpObserverId = this.rtpObserverId(); } } exports.CloseRtpObserverRequest = CloseRtpObserverRequest; class CloseRtpObserverRequestT { rtpObserverId; constructor(rtpObserverId = null) { this.rtpObserverId = rtpObserverId; } pack(builder) { const rtpObserverId = (this.rtpObserverId !== null ? builder.createString(this.rtpObserverId) : 0); return CloseRtpObserverRequest.createCloseRtpObserverRequest(builder, rtpObserverId); } } exports.CloseRtpObserverRequestT = CloseRtpObserverRequestT;