UNPKG

@camera.ui/go2rtc

Version:
14 lines 634 B
import fs from 'fs-extra'; import { dirname, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import { getPlatform } from './utils.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const go2rtcBinaryPath = resolve(__dirname, '../binary'); const go2rtcFile = 'go2rtc' + (getPlatform() === 'win32' ? '.exe' : ''); const go2rtcExtractedFilePath = resolve(go2rtcBinaryPath, go2rtcFile); export const go2rtcPath = () => go2rtcExtractedFilePath; export const isGo2rtcAvailable = () => { return fs.existsSync(go2rtcExtractedFilePath); }; //# sourceMappingURL=index.js.map