Closed d9k closed 4 years ago
// . . . . . let createRecorderStateLogger = (eventLabel) => { let callback = (event) => { let descriptionParts = [event.type, event.mediaType, event.state].filter(x => x) let description = descriptionParts.join(' ') this.log(`recorderEndpoint : ${eventLabel} event: ${description}`) } callback.bind(this) return callback } let eventsNamesToLog = [ 'RecordingStarted', 'RecordingStopped', 'MediaFlowingIn', 'MediaFlowingOut', 'MediaStoppedFlowingIn', 'MediaStoppedFlowingOut', ] // logging recorder state changes for (let eventNameToLog of eventsNamesToLog) { this.recorderEndpoint.on( eventNameToLog, createRecorderStateLogger(eventNameToLog) ); } this.recorderEndpoint.on('RecordingStarted', (evt) => { // NOT FIRED!!! this.wsMessageToClient({ category: MessageFromServerCategory.recordingStarted, }) }); // start recording await this.recorderEndpoint.record(); setTimeout(async () => { await this.recorderEndpoint.stopRecord(); }, 7000);
[25.12.2019 18:20:59] recorderEndpoint : MediaFlowingIn event: MediaFlowInStateChange AUDIO FLOWING [25.12.2019 18:20:59] recorderEndpoint : MediaFlowingIn event: MediaFlowInStateChange VIDEO FLOWING [25.12.2019 18:20:59] recorderEndpoint : RecordingStopped event: Recording [25.12.2019 18:21:05] recorderEndpoint : RecordingStopped event: Stopped
Video file is saved normally but event object has type = 'Recording' on RecordingStopped event and RecordingStarted event is not fired at all.
type = 'Recording'
RecordingStopped
RecordingStarted
// package-lock.json: "lib-kurento": { "version": "0.0.5", "kurento-client": { "version": "6.12.0",
Hi,
Please install version v0.07, try again and let me know the results
v0.07
@givo, seems to be working, thx)
Video file is saved normally but event object has
type = 'Recording'
onRecordingStopped
event andRecordingStarted
event is not fired at all.