Make recording names compatible with red5

This commit is contained in:
Lucas Fialho Zawacki 2018-04-03 18:35:38 +00:00
parent e51a30b75d
commit 58241c0c76
2 changed files with 10 additions and 1 deletions

View File

@ -16,6 +16,8 @@ from-audio: "from-audio-sfu"
to-audio: "to-audio-sfu"
to-akka: "to-akka-apps-redis-channel"
recordingBasePath: "file:///var/kurento/recordings"
log:
filename: '/var/log/bigbluebutton/bbb-webrtc-sfu/bbb-webrtc-sfu.log'
level: 'verbose'

View File

@ -26,12 +26,19 @@ module.exports = class RecordingSession extends EventEmitter {
this.options = {
mediaProfile: 'MP4_VIDEO_ONLY',
uri: "/recordings/" + room + "/" + recordingName + "/" + (new Date()).toISOString() + ".mp4",
uri: this.getRecordingPath(room, 'medium', recordingName),
stopOnEndOfStream: true
};
}
getRecordingPath (room, profile, recordingName) {
const basePath = config.get('recordingBasePath');
const timestamp = (new Date()).getTime();
return `${basePath}/${room}/${profile}-${recordingName}-${timestamp}.mp4`;
}
async start () {
this._status = C.STATUS.STARTING;
try {