Remove wait before publishing master playlist
It doesn't seem necessary
This commit is contained in:
parent
ec720affe9
commit
3733175b6b
|
@ -17,7 +17,6 @@ import {
|
||||||
import { VideoFileModel } from '@server/models/video/video-file'
|
import { VideoFileModel } from '@server/models/video/video-file'
|
||||||
import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
|
import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
|
||||||
import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models'
|
import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models'
|
||||||
import { wait } from '@shared/core-utils'
|
|
||||||
import { VideoStorage, VideoStreamingPlaylistType } from '@shared/models'
|
import { VideoStorage, VideoStreamingPlaylistType } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
generateHLSMasterPlaylistFilename,
|
generateHLSMasterPlaylistFilename,
|
||||||
|
@ -190,17 +189,6 @@ class MuxingSession extends EventEmitter {
|
||||||
if (this.masterPlaylistCreated === true) return
|
if (this.masterPlaylistCreated === true) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let masterPlaylistContent: string
|
|
||||||
|
|
||||||
do {
|
|
||||||
masterPlaylistContent = await readFile(path, 'utf8')
|
|
||||||
|
|
||||||
if (!masterPlaylistContent) {
|
|
||||||
await wait(250)
|
|
||||||
logger.debug('Waiting for master playlist generation for ' + this.videoUUID, this.lTags())
|
|
||||||
}
|
|
||||||
} while (!masterPlaylistContent) // Not generated yet
|
|
||||||
|
|
||||||
if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
|
if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
|
||||||
const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename)
|
const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue