File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ declare module 'ffmpeg-for-homebridge' {
2
+ const ffmpeg_for_homebridge : string ;
3
+ export = ffmpeg_for_homebridge ;
4
+ }
Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ import {
21
21
} from 'homebridge' ;
22
22
import { spawn } from 'child_process' ;
23
23
import { createSocket , Socket } from 'dgram' ;
24
+ import ffmpegPath from 'ffmpeg-for-homebridge' ;
24
25
import getPort from 'get-port' ;
25
26
import os from 'os' ;
26
27
import { networkInterfaceDefault } from 'systeminformation' ;
27
28
import { CameraConfig , VideoConfig } from './configTypes' ;
28
29
import { FfmpegProcess } from './ffmpeg' ;
29
30
import { Logger } from './logger' ;
30
- const pathToFfmpeg = require ( 'ffmpeg-for-homebridge' ) ; // eslint-disable-line @typescript-eslint/no-var-requires
31
31
32
32
type SessionInfo = {
33
33
address : string ; // address of the HAP controller
@@ -80,7 +80,7 @@ export class StreamingDelegate implements CameraStreamingDelegate {
80
80
this . hap = hap ;
81
81
82
82
this . cameraName = cameraConfig . name ;
83
- this . videoProcessor = videoProcessor || pathToFfmpeg || 'ffmpeg' ;
83
+ this . videoProcessor = videoProcessor || ffmpegPath || 'ffmpeg' ;
84
84
this . interfaceName = interfaceName ;
85
85
86
86
api . on ( APIEvent . SHUTDOWN , ( ) => {
You can’t perform that action at this time.
0 commit comments