From 41fb13c330de629df2d23379209e79c7af0f2e9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Aug 2021 14:32:44 +0200 Subject: esModuleInterop to true --- server/lib/live/shared/muxing-session.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'server/lib/live') diff --git a/server/lib/live/shared/muxing-session.ts b/server/lib/live/shared/muxing-session.ts index 0c9fb0cb6..a6907142d 100644 --- a/server/lib/live/shared/muxing-session.ts +++ b/server/lib/live/shared/muxing-session.ts @@ -1,6 +1,6 @@ -import * as Bluebird from 'bluebird' -import * as chokidar from 'chokidar' +import { mapSeries } from 'bluebird' +import { FSWatcher, watch } from 'chokidar' import { FfmpegCommand } from 'fluent-ffmpeg' import { appendFile, ensureDir, readFile, stat } from 'fs-extra' import { basename, join } from 'path' @@ -67,8 +67,8 @@ class MuxingSession extends EventEmitter { private segmentsToProcessPerPlaylist: { [playlistId: string]: string[] } = {} - private tsWatcher: chokidar.FSWatcher - private masterWatcher: chokidar.FSWatcher + private tsWatcher: FSWatcher + private masterWatcher: FSWatcher private readonly isAbleToUploadVideoWithCache = memoizee((userId: number) => { return isAbleToUploadVideo(userId, 1000) @@ -197,7 +197,7 @@ class MuxingSession extends EventEmitter { } private watchMasterFile (outPath: string) { - this.masterWatcher = chokidar.watch(outPath + '/' + this.streamingPlaylist.playlistFilename) + this.masterWatcher = watch(outPath + '/' + this.streamingPlaylist.playlistFilename) this.masterWatcher.on('add', () => { this.emit('master-playlist-created', { videoId: this.videoId }) @@ -210,7 +210,7 @@ class MuxingSession extends EventEmitter { private watchTSFiles (outPath: string) { const startStreamDateTime = new Date().getTime() - this.tsWatcher = chokidar.watch(outPath + '/*.ts') + this.tsWatcher = watch(outPath + '/*.ts') const playlistIdMatcher = /^([\d+])-/ @@ -306,7 +306,7 @@ class MuxingSession extends EventEmitter { } private processSegments (hlsVideoPath: string, segmentPaths: string[]) { - Bluebird.mapSeries(segmentPaths, async previousSegment => { + mapSeries(segmentPaths, async previousSegment => { // Add sha hash of previous segments, because ffmpeg should have finished generating them await LiveSegmentShaStore.Instance.addSegmentSha(this.videoUUID, previousSegment) -- cgit v1.2.3