This affects both play and download actions. A better approach may be to just use url verbatim, chopping off everything up to and including /openvidu/, and plopping the rest as the video URL, i.e. if url as reported in RecordingInfo is https://foo.com/openvidu/recordings/... you could just string.replace(/^.*?/openvidu/$/, '/').
Furthermore, it makes equally incorrect, but in some sense the inverse assumption about thumbnail names: apparently, it assumes thumbnail names are <rec_name>/<rec_name>.jpg (by taking the last component of the video url), but they are, in fact, <session_id>/<session_id>.jpg. A better approach is to perhaps construct the thumbnail url the way the video url is currently constructed, i.e. as ${baseUrl}recordings/${recording.id}/${recording.id}.jpg
See subject. The assumption is the recording path is
<session_id>/<session_id>.mp4
, but it is, in fact,<session_id>/<REC_NAME>.mp4
.https://github.com/OpenVidu/openvidu/blob/918bf0ae6dd1c0fbf416626d82045234b0725863/openvidu-components-angular/projects/openvidu-angular/src/lib/services/recording/recording.service.ts#L80
https://github.com/OpenVidu/openvidu/blob/918bf0ae6dd1c0fbf416626d82045234b0725863/openvidu-components-angular/projects/openvidu-angular/src/lib/services/recording/recording.service.ts#L94
This affects both
play
anddownload
actions. A better approach may be to just useurl
verbatim, chopping off everything up to and including/openvidu/
, and plopping the rest as the video URL, i.e. ifurl
as reported inRecordingInfo
ishttps://foo.com/openvidu/recordings/...
you could juststring.replace(/^.*?/openvidu/$/, '/')
.Furthermore, it makes equally incorrect, but in some sense the inverse assumption about thumbnail names: apparently, it assumes thumbnail names are
<rec_name>/<rec_name>.jpg
(by taking the last component of the video url), but they are, in fact,<session_id>/<session_id>.jpg
. A better approach is to perhaps construct the thumbnail url the way the video url is currently constructed, i.e. as${baseUrl}recordings/${recording.id}/${recording.id}.jpg
https://github.com/OpenVidu/openvidu/blob/918bf0ae6dd1c0fbf416626d82045234b0725863/openvidu-components-angular/projects/openvidu-angular/src/lib/pipes/recording.pipe.ts#L62-L71