- private async createLivePlaylist (video: MVideo, allResolutions: number[]): Promise<MStreamingPlaylistVideo> {
- const playlist = await VideoStreamingPlaylistModel.loadOrGenerate(video)
-
- playlist.playlistFilename = generateHLSMasterPlaylistFilename(true)
- playlist.segmentsSha256Filename = generateHlsSha256SegmentsFilename(true)
-
- playlist.p2pMediaLoaderPeerVersion = P2P_MEDIA_LOADER_PEER_VERSION
- playlist.type = VideoStreamingPlaylistType.HLS
-
- playlist.assignP2PMediaLoaderInfoHashes(video, allResolutions)
-
- playlist.storage = CONFIG.OBJECT_STORAGE.ENABLED
- ? VideoStorage.OBJECT_STORAGE
- : VideoStorage.FILE_SYSTEM
+ private async saveStartingSession (videoLive: MVideoLiveVideoWithSetting) {
+ const replaySettings = videoLive.saveReplay
+ ? new VideoLiveReplaySettingModel({
+ privacy: videoLive.ReplaySetting.privacy
+ })
+ : null