UNPKG

onvif-nvt-ts

Version:

Wrapper for ONVIF spec to control NVT (Network Video Transitter) devices. Forked and added TypeScript support from onvif-nvt.

28 lines (21 loc) 489 B
import * as Util from './util' let testCameraType = '' export function setDebugData(cameraType: string) { let errMsg = '' if ((errMsg = Util.isInvalidValue(cameraType, 'string'))) { throw new Error('cameraType is invalid: ' + errMsg) } testCameraType = cameraType } export function reset() { testCameraType = '' } export function isTest() { if (testCameraType.length) { return true } return false } export function getCameraType() { return testCameraType }