From ed579b4e72cda380a7d3ada93cd222b332aa012c Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 12 May 2025 16:00:42 +0200 Subject: [PATCH] ov-components: update recording stream URL to use '/media' segment instead of '/stream' --- .../src/lib/directives/api/videoconference.directive.ts | 8 ++++++-- .../src/lib/services/recording/recording.service.ts | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/directives/api/videoconference.directive.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/directives/api/videoconference.directive.ts index 0ab599ee..5979efca 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/directives/api/videoconference.directive.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/directives/api/videoconference.directive.ts @@ -739,14 +739,18 @@ export class AudioEnabledDirective implements OnDestroy { /** * The **recordingStreamBaseUrl** directive sets the base URL for retrieving recording streams. * The complete request URL is dynamically constructed by concatenating the supplied URL, the - * internally managed recordingId, and the `/stream` segment. + * internally managed recordingId, and the `/media` segment. * * The final URL format will be: * - * {recordingStreamBaseUrl}/{recordingId}/stream + * {recordingStreamBaseUrl}/{recordingId}/media * * Default: `"call/api/recordings/{recordingId}/stream"` * + * Example: + * Given a recordingStreamBaseUrl of `api/recordings`, the resulting URL for a recordingId of `12345` would be: + * `api/recordings/12345/media` + * * It is essential that the resulting route is declared and configured on your backend, as it is * used for serving and accessing the recording streams. * diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/recording/recording.service.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/recording/recording.service.ts index 01fb04ae..f0466ebf 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/recording/recording.service.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/recording/recording.service.ts @@ -155,7 +155,7 @@ export class RecordingService { this.log.d('Playing recording', recording); const queryParamForAvoidCache = `?t=${new Date().getTime()}`; const baseUrl = this.libService.getRecordingStreamBaseUrl(); - const streamRecordingUrl = `${baseUrl}${recording.id}/stream${queryParamForAvoidCache}`; + const streamRecordingUrl = `${baseUrl}${recording.id}/media${queryParamForAvoidCache}`; this.actionService.openRecordingPlayerDialog(streamRecordingUrl); } @@ -169,7 +169,7 @@ export class RecordingService { const queryParamForAvoidCache = `?t=${new Date().getTime()}`; const link = document.createElement('a'); const baseUrl = this.libService.getRecordingStreamBaseUrl(); - link.href = `${baseUrl}${recording.id}/stream${queryParamForAvoidCache}`; + link.href = `${baseUrl}${recording.id}/media${queryParamForAvoidCache}`; link.download = recording.filename || 'openvidu-recording.mp4'; link.dispatchEvent( new MouseEvent('click', {