diff options
author | Chocobozzz <me@florianbigard.com> | 2020-10-26 16:44:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | b5b687550d8ef8beafdf706e45d6556fb5f4c876 (patch) | |
tree | 232412d463c78af1f7ab5797db5aecf1096d08da /client/src/app/shared/shared-main/video | |
parent | ef680f68351ec10ab73a1131570a6d14ce14c195 (diff) | |
download | PeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.tar.gz PeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.tar.zst PeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.zip |
Add ability to save live replay
Diffstat (limited to 'client/src/app/shared/shared-main/video')
-rw-r--r-- | client/src/app/shared/shared-main/video/live-video.service.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/video/live-video.service.ts b/client/src/app/shared/shared-main/video/live-video.service.ts index 2cd1c66a5..093d65e83 100644 --- a/client/src/app/shared/shared-main/video/live-video.service.ts +++ b/client/src/app/shared/shared-main/video/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 { VideoCreate, LiveVideo } from '@shared/models' | 5 | import { LiveVideo, LiveVideoCreate, LiveVideoUpdate } from '@shared/models' |
6 | import { environment } from '../../../../environments/environment' | 6 | import { environment } from '../../../../environments/environment' |
7 | 7 | ||
8 | @Injectable() | 8 | @Injectable() |
@@ -14,7 +14,7 @@ export class LiveVideoService { | |||
14 | private restExtractor: RestExtractor | 14 | private restExtractor: RestExtractor |
15 | ) {} | 15 | ) {} |
16 | 16 | ||
17 | goLive (video: VideoCreate) { | 17 | goLive (video: LiveVideoCreate) { |
18 | return this.authHttp | 18 | return this.authHttp |
19 | .post<{ video: { id: number, uuid: string } }>(LiveVideoService.BASE_VIDEO_LIVE_URL, video) | 19 | .post<{ video: { id: number, uuid: string } }>(LiveVideoService.BASE_VIDEO_LIVE_URL, video) |
20 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 20 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
@@ -25,4 +25,10 @@ export class LiveVideoService { | |||
25 | .get<LiveVideo>(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId) | 25 | .get<LiveVideo>(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId) |
26 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 26 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
27 | } | 27 | } |
28 | |||
29 | updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { | ||
30 | return this.authHttp | ||
31 | .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate) | ||
32 | .pipe(catchError(err => this.restExtractor.handleError(err))) | ||
33 | } | ||
28 | } | 34 | } |