PeerTube/server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts

21 lines
629 B
TypeScript
Raw Normal View History

import { LiveRTMPHLSTranscodingJobHandler } from '@server/lib/runners'
import { AbstractTranscodingWrapper } from './abstract-transcoding-wrapper'
export class RemoteTranscodingWrapper extends AbstractTranscodingWrapper {
async run () {
await new LiveRTMPHLSTranscodingJobHandler().create({
2023-05-16 09:12:50 +02:00
rtmpUrl: this.inputPublicUrl,
toTranscode: this.toTranscode,
video: this.videoLive.Video,
outputDirectory: this.outDirectory,
playlist: this.streamingPlaylist,
segmentListSize: this.segmentListSize,
segmentDuration: this.segmentDuration
})
}
abort () {
this.emit('end')
}
}