diff options
author | Chocobozzz <me@florianbigard.com> | 2022-05-03 15:11:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-05-03 15:21:42 +0200 |
commit | 39e68a3254242bd410ffc20b7f74b442a07b390f (patch) | |
tree | 3ad74189343796d52c8fd5c1825ac648dff15ea1 /client/src/app/shared/shared-video-live/live-video.service.ts | |
parent | 26e3e98ff0e222a9fb9226938ac6902af77921bd (diff) | |
download | PeerTube-39e68a3254242bd410ffc20b7f74b442a07b390f.tar.gz PeerTube-39e68a3254242bd410ffc20b7f74b442a07b390f.tar.zst PeerTube-39e68a3254242bd410ffc20b7f74b442a07b390f.zip |
Add session informations in live modal
Diffstat (limited to 'client/src/app/shared/shared-video-live/live-video.service.ts')
-rw-r--r-- | client/src/app/shared/shared-video-live/live-video.service.ts | 8 |
1 files changed, 7 insertions, 1 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 0d166e91d..11b9dd739 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 | |||
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult } from '@shared/models' | 5 | import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | 7 | ||
8 | @Injectable() | 8 | @Injectable() |
@@ -26,6 +26,12 @@ export class LiveVideoService { | |||
26 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 26 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
27 | } | 27 | } |
28 | 28 | ||
29 | listSessions (videoId: number | string) { | ||
30 | return this.authHttp | ||
31 | .get<ResultList<LiveVideoSession>>(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId + '/sessions') | ||
32 | .pipe(catchError(err => this.restExtractor.handleError(err))) | ||
33 | } | ||
34 | |||
29 | updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { | 35 | updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { |
30 | return this.authHttp | 36 | return this.authHttp |
31 | .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate) | 37 | .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate) |