diff --git a/On-Premise-Recording-Nodejs/server/recordManager.js b/On-Premise-Recording-Nodejs/server/recordManager.js index 9d13caa..5570df7 100755 --- a/On-Premise-Recording-Nodejs/server/recordManager.js +++ b/On-Premise-Recording-Nodejs/server/recordManager.js @@ -51,8 +51,8 @@ class RecordManager{ }; sdk.setMixLayout(layout); + this.subscribeEvents(recorder); sdk.joinChannel(key || null, channel, 0, appid, storagePath).then(() => { - this.subscribeEvents(recorder); this.recorders[sid] = recorder; console.log(`recorder started ${appid} ${channel} ${sid}`) resolve(recorder); @@ -158,4 +158,4 @@ class RecordManager{ -module.exports = new RecordManager(); \ No newline at end of file +module.exports = new RecordManager();