ov-components: update recording stream URL to use '/media' segment instead of '/stream'

master
Carlos Santos 2025-05-12 16:00:42 +02:00
parent d8ce736cc0
commit ed579b4e72
2 changed files with 8 additions and 4 deletions

View File

@ -739,14 +739,18 @@ export class AudioEnabledDirective implements OnDestroy {
/** /**
* The **recordingStreamBaseUrl** directive sets the base URL for retrieving recording streams. * The **recordingStreamBaseUrl** directive sets the base URL for retrieving recording streams.
* The complete request URL is dynamically constructed by concatenating the supplied URL, the * 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: * The final URL format will be:
* *
* {recordingStreamBaseUrl}/{recordingId}/stream * {recordingStreamBaseUrl}/{recordingId}/media
* *
* Default: `"call/api/recordings/{recordingId}/stream"` * 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 * 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. * used for serving and accessing the recording streams.
* *

View File

@ -155,7 +155,7 @@ export class RecordingService {
this.log.d('Playing recording', recording); this.log.d('Playing recording', recording);
const queryParamForAvoidCache = `?t=${new Date().getTime()}`; const queryParamForAvoidCache = `?t=${new Date().getTime()}`;
const baseUrl = this.libService.getRecordingStreamBaseUrl(); const baseUrl = this.libService.getRecordingStreamBaseUrl();
const streamRecordingUrl = `${baseUrl}${recording.id}/stream${queryParamForAvoidCache}`; const streamRecordingUrl = `${baseUrl}${recording.id}/media${queryParamForAvoidCache}`;
this.actionService.openRecordingPlayerDialog(streamRecordingUrl); this.actionService.openRecordingPlayerDialog(streamRecordingUrl);
} }
@ -169,7 +169,7 @@ export class RecordingService {
const queryParamForAvoidCache = `?t=${new Date().getTime()}`; const queryParamForAvoidCache = `?t=${new Date().getTime()}`;
const link = document.createElement('a'); const link = document.createElement('a');
const baseUrl = this.libService.getRecordingStreamBaseUrl(); 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.download = recording.filename || 'openvidu-recording.mp4';
link.dispatchEvent( link.dispatchEvent(
new MouseEvent('click', { new MouseEvent('click', {