]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - packages/peertube-runner/server/process/shared/process-live.ts
Enable external plugins to test the PR
[github/Chocobozzz/PeerTube.git] / packages / peertube-runner / server / process / shared / process-live.ts
index 5a3b596a2e5c1cfd3323c9eabfcdf83decdf5518..b17b51c7c5639892f2363835326847c6904d674e 100644 (file)
@@ -204,8 +204,8 @@ export class ProcessLiveRTMPHLSTranscoding {
 
   // ---------------------------------------------------------------------------
 
-  private sendDeletedChunkUpdate (deletedChunk: string) {
-    if (this.ended) return
+  private sendDeletedChunkUpdate (deletedChunk: string): Promise<any> {
+    if (this.ended) return Promise.resolve()
 
     logger.debug(`Sending removed live chunk ${deletedChunk} update`)
 
@@ -230,8 +230,8 @@ export class ProcessLiveRTMPHLSTranscoding {
     return this.updateWithRetry(payload)
   }
 
-  private sendAddedChunkUpdate (addedChunk: string) {
-    if (this.ended) return
+  private sendAddedChunkUpdate (addedChunk: string): Promise<any> {
+    if (this.ended) return Promise.resolve()
 
     logger.debug(`Sending added live chunk ${addedChunk} update`)
 
@@ -257,7 +257,7 @@ export class ProcessLiveRTMPHLSTranscoding {
     return this.updateWithRetry(payload)
   }
 
-  private async updateWithRetry (payload: LiveRTMPHLSTranscodingUpdatePayload, currentTry = 1) {
+  private async updateWithRetry (payload: LiveRTMPHLSTranscodingUpdatePayload, currentTry = 1): Promise<any> {
     if (this.ended || this.errored) return
 
     try {