UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

23 lines (22 loc) 787 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PlaneTrackerEvents = void 0; const WsEvents_1 = require("../internal/WsEvents"); const PlaneTrackerEvents_1 = require("../types/ws/PlaneTrackerEvents"); class PlaneTrackerEvents extends WsEvents_1.WsEvents { _apiUser; constructor(ws, _apiUser) { super(PlaneTrackerEvents_1.ptrEventsSchema, ws); this._apiUser = _apiUser; this.ws.onOpen = this.sendInitMsg; } sendInitMsg = () => { this.ws.send(JSON.stringify({ type: 'USER_INFO', userId: this._apiUser.userId, userName: this._apiUser.userName, userPriority: this._apiUser.userPriority, })); }; } exports.PlaneTrackerEvents = PlaneTrackerEvents;