aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-live
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-video-live')
-rw-r--r--client/src/app/shared/shared-video-live/live-video.service.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts
index 11b9dd739..89bfd84a0 100644
--- a/client/src/app/shared/shared-video-live/live-video.service.ts
+++ b/client/src/app/shared/shared-video-live/live-video.service.ts
@@ -4,6 +4,7 @@ import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' 5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { VideoService } from '../shared-main'
7 8
8@Injectable() 9@Injectable()
9export class LiveVideoService { 10export class LiveVideoService {
@@ -32,6 +33,12 @@ export class LiveVideoService {
32 .pipe(catchError(err => this.restExtractor.handleError(err))) 33 .pipe(catchError(err => this.restExtractor.handleError(err)))
33 } 34 }
34 35
36 findLiveSessionFromVOD (videoId: number | string) {
37 return this.authHttp
38 .get<LiveVideoSession>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/live-session')
39 .pipe(catchError(err => this.restExtractor.handleError(err)))
40 }
41
35 updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { 42 updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) {
36 return this.authHttp 43 return this.authHttp
37 .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate) 44 .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate)