openvidu-components: Fixed video recording cache

The browser was storing the play recording request on cache . Adding a query parameter which is updated each time fix this problem
pull/803/head
Carlos Santos 2023-04-25 12:40:21 +02:00
parent fffbdd3cd5
commit f5e18fc11d
1 changed files with 5 additions and 3 deletions

View File

@ -19,7 +19,6 @@ export class RecordingService {
private recordingStatus = <BehaviorSubject<{ info: RecordingInfo; time?: Date } | undefined>>new BehaviorSubject(undefined);
private baseUrl = '/' + (!!window.location.pathname.split('/')[1] ? window.location.pathname.split('/')[1] + '/' : '');
/**
* @internal
*/
@ -72,7 +71,10 @@ export class RecordingService {
const recordingId = recording.id;
// Only COMPOSED recording is supported. The extension will allways be 'mp4'.
const extension = 'mp4'; //recording.url?.split('.').pop() || 'mp4';
this.actionService.openRecordingPlayerDialog(`${this.baseUrl}recordings/${recordingId}/${recordingId}.${extension}`);
const queryParamForAvoidCache = `?t=${new Date().getTime()}`;
this.actionService.openRecordingPlayerDialog(
`${this.baseUrl}recordings/${recordingId}/${recordingId}.${extension}${queryParamForAvoidCache}`
);
}
/**