diff --git a/src/scene-entry-manager.js b/src/scene-entry-manager.js index f525c6d0f63d20b6fe06393a0fee129dd6ce5922..c63422fdc9289c25787bc3c983c8833cacd320cf 100644 --- a/src/scene-entry-manager.js +++ b/src/scene-entry-manager.js @@ -64,10 +64,6 @@ export default class SceneEntryManager { if (qsTruthy("offline")) return; - if (mediaStream) { - NAF.connection.adapter.setLocalMediaStream(mediaStream); - } - this._spawnAvatar(); if (isBotMode) { @@ -75,6 +71,10 @@ export default class SceneEntryManager { return; } + if (mediaStream) { + NAF.connection.adapter.setLocalMediaStream(mediaStream); + } + this.scene.classList.remove("hand-cursor"); this.scene.classList.add("no-cursor"); @@ -279,6 +279,7 @@ export default class SceneEntryManager { }; await new Promise(resolve => audioEl.addEventListener("canplay", resolve)); mediaStream.addTrack(audioEl.captureStream().getAudioTracks()[0]); + NAF.connection.adapter.setLocalMediaStream(mediaStream); audioEl.play(); }; }