I have the following code in my project that add a "naf:reconnecting" state I'm using to not show a user left message for clientDisconnected event and using it in video-texture-target and waypoint components as well to clean the projected screen share of the disconnected user or unoccupy waypoint if the user really disconnected and that's not just me that reconnects.
if (!NAF.adapters.adapters.janus.prototype.reconnectOriginal) {
NAF.adapters.adapters.janus.prototype.reconnectOriginal = NAF.adapters.adapters.janus.prototype.reconnect;
NAF.adapters.adapters.janus.prototype.reconnect = async function () {
const sceneEl = document.querySelector("a-scene");
if (!sceneEl) {
return;
}
sceneEl.addState("naf:reconnecting");
await this.reconnectOriginal();
sceneEl.removeState("naf:reconnecting");
};
}
I have the following code in my project that add a "naf:reconnecting" state I'm using to not show a user left message for
clientDisconnected
event and using it in video-texture-target and waypoint components as well to clean the projected screen share of the disconnected user or unoccupy waypoint if the user really disconnected and that's not just me that reconnects.Properly add that in the adapter in next release.