frontend: update recording methods in HttpService to use MeetRecordingInfo type and add generateRecordingToken method
This commit is contained in:
parent
6a916b1ece
commit
b4292e8ca1
@ -1,15 +1,15 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
|
MeetRecordingInfo,
|
||||||
MeetRoom,
|
MeetRoom,
|
||||||
MeetRoomOptions,
|
MeetRoomOptions,
|
||||||
MeetRoomRoleAndPermissions,
|
|
||||||
MeetRoomPreferences,
|
MeetRoomPreferences,
|
||||||
SecurityPreferencesDTO,
|
MeetRoomRoleAndPermissions,
|
||||||
ParticipantOptions,
|
ParticipantOptions,
|
||||||
|
SecurityPreferencesDTO,
|
||||||
User
|
User
|
||||||
} from '@lib/typings/ce';
|
} from '@lib/typings/ce';
|
||||||
import { RecordingInfo } from 'openvidu-components-angular';
|
|
||||||
import { lastValueFrom } from 'rxjs';
|
import { lastValueFrom } from 'rxjs';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -104,7 +104,11 @@ export class HttpService {
|
|||||||
return this.getRequest(`${this.INTERNAL_API_PATH_PREFIX}/auth/profile`);
|
return this.getRequest(`${this.INTERNAL_API_PATH_PREFIX}/auth/profile`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRecordings(continuationToken?: string): Promise<{ recordings: RecordingInfo[]; continuationToken: string }> {
|
generateRecordingToken(roomId: string, secret: string): Promise<{ token: string }> {
|
||||||
|
return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/rooms/${roomId}/recording-token`, { secret });
|
||||||
|
}
|
||||||
|
|
||||||
|
getRecordings(continuationToken?: string): Promise<{ recordings: MeetRecordingInfo[]; continuationToken: string }> {
|
||||||
let path = `${this.API_PATH_PREFIX}/recordings`;
|
let path = `${this.API_PATH_PREFIX}/recordings`;
|
||||||
|
|
||||||
if (continuationToken) {
|
if (continuationToken) {
|
||||||
@ -114,15 +118,15 @@ export class HttpService {
|
|||||||
return this.getRequest(path);
|
return this.getRequest(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
startRecording(roomId: string): Promise<RecordingInfo> {
|
startRecording(roomId: string): Promise<MeetRecordingInfo> {
|
||||||
return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/recordings`, { roomId });
|
return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/recordings`, { roomId });
|
||||||
}
|
}
|
||||||
|
|
||||||
stopRecording(recordingId: string): Promise<RecordingInfo> {
|
stopRecording(recordingId: string): Promise<MeetRecordingInfo> {
|
||||||
return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/recordings/${recordingId}/stop`);
|
return this.postRequest(`${this.INTERNAL_API_PATH_PREFIX}/recordings/${recordingId}/stop`);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteRecording(recordingId: string): Promise<RecordingInfo> {
|
deleteRecording(recordingId: string): Promise<any> {
|
||||||
return this.deleteRequest(`${this.API_PATH_PREFIX}/recordings/${recordingId}`);
|
return this.deleteRequest(`${this.API_PATH_PREFIX}/recordings/${recordingId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user