UNPKG

uomlibraryapps-card-scanner-hybrid-local

Version:

Library Node.js app for UoM card scanning (hybrid-local)

23 lines (22 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const picommons_kiosk_1 = require("picommons-kiosk"); const uomlibraryapps_card_scanner_events_1 = require("uomlibraryapps-card-scanner-events"); const uomlibraryapps_card_scanner_hybrid_1 = require("uomlibraryapps-card-scanner-hybrid"); const media_api_1 = require("../apis/media.api"); class CardScannerHybridLocalApp extends uomlibraryapps_card_scanner_hybrid_1.CardScannerHybridApp { constructor(startChrome = true, shutdownOnExit = false) { super('hybrid-local', startChrome, shutdownOnExit); const mediaConfig = this.getConfigArea('media'); if (!picommons_kiosk_1.isTMediaConfig(mediaConfig)) throw new Error('Media config is not valid'); this.install((restServer, path) => { // tslint:disable-next-line:no-unused-expression new media_api_1.MediaApi(restServer, this.getEventSessionModel(), this.getSignupModel(), this.getDetectionModel(), path, mediaConfig.path); }); } buildSocketIoServer(expressServer, expressConfig) { return new uomlibraryapps_card_scanner_events_1.SocketIoEventsServer(expressServer, expressConfig); } } exports.CardScannerHybridLocalApp = CardScannerHybridLocalApp;