UNPKG

mediasoup

Version:

Cutting Edge WebRTC Video Conferencing

81 lines (80 loc) 3.35 kB
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify Object.defineProperty(exports, "__esModule", { value: true }); exports.VideoOrientationChangeNotificationT = exports.VideoOrientationChangeNotification = 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 VideoOrientationChangeNotification { bb = null; bb_pos = 0; __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsVideoOrientationChangeNotification(bb, obj) { return (obj || new VideoOrientationChangeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsVideoOrientationChangeNotification(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new VideoOrientationChangeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } camera() { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false; } flip() { const offset = this.bb.__offset(this.bb_pos, 6); return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false; } rotation() { const offset = this.bb.__offset(this.bb_pos, 8); return offset ? this.bb.readUint16(this.bb_pos + offset) : 0; } static startVideoOrientationChangeNotification(builder) { builder.startObject(3); } static addCamera(builder, camera) { builder.addFieldInt8(0, +camera, +false); } static addFlip(builder, flip) { builder.addFieldInt8(1, +flip, +false); } static addRotation(builder, rotation) { builder.addFieldInt16(2, rotation, 0); } static endVideoOrientationChangeNotification(builder) { const offset = builder.endObject(); return offset; } static createVideoOrientationChangeNotification(builder, camera, flip, rotation) { VideoOrientationChangeNotification.startVideoOrientationChangeNotification(builder); VideoOrientationChangeNotification.addCamera(builder, camera); VideoOrientationChangeNotification.addFlip(builder, flip); VideoOrientationChangeNotification.addRotation(builder, rotation); return VideoOrientationChangeNotification.endVideoOrientationChangeNotification(builder); } unpack() { return new VideoOrientationChangeNotificationT(this.camera(), this.flip(), this.rotation()); } unpackTo(_o) { _o.camera = this.camera(); _o.flip = this.flip(); _o.rotation = this.rotation(); } } exports.VideoOrientationChangeNotification = VideoOrientationChangeNotification; class VideoOrientationChangeNotificationT { camera; flip; rotation; constructor(camera = false, flip = false, rotation = 0) { this.camera = camera; this.flip = flip; this.rotation = rotation; } pack(builder) { return VideoOrientationChangeNotification.createVideoOrientationChangeNotification(builder, this.camera, this.flip, this.rotation); } } exports.VideoOrientationChangeNotificationT = VideoOrientationChangeNotificationT;