X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-video-live%2Flive-video.service.ts;h=11b9dd739e761f790088d691e6ae6d6f1c8c1a40;hb=39e68a3254242bd410ffc20b7f74b442a07b390f;hp=0d166e91d50565fb7325eb89c4ebf581f4d305df;hpb=2e80d256cc75b4b02c8efc3d3e4cdf57ddf401a8;p=github%2FChocobozzz%2FPeerTube.git 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' import { HttpClient } from '@angular/common/http' import { Injectable } from '@angular/core' import { RestExtractor } from '@app/core' -import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult } from '@shared/models' +import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' import { environment } from '../../../environments/environment' @Injectable() @@ -26,6 +26,12 @@ export class LiveVideoService { .pipe(catchError(err => this.restExtractor.handleError(err))) } + listSessions (videoId: number | string) { + return this.authHttp + .get>(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId + '/sessions') + .pipe(catchError(err => this.restExtractor.handleError(err))) + } + updateLive (videoId: number | string, liveUpdate: LiveVideoUpdate) { return this.authHttp .put(LiveVideoService.BASE_VIDEO_LIVE_URL + videoId, liveUpdate)