diff --git a/JitsiParticipant.js b/JitsiParticipant.js index 488e8bef55..29738d5b62 100644 --- a/JitsiParticipant.js +++ b/JitsiParticipant.js @@ -191,7 +191,16 @@ export default class JitsiParticipant { } /** - * @returns {Boolean} Wheter this participants replaces another participant + * @returns {Boolean} Whether this participant is a hidden participant. Some + * special system participants may want to join hidden (like for example the + * recorder). + */ + isHiddenFromRecorder() { + return Boolean(this._identity?.user?.['hidden-from-recorder']); + } + + /** + * @returns {Boolean} Whether this participant replaces another participant * from the meeting. */ isReplacing() { diff --git a/modules/xmpp/ChatRoom.js b/modules/xmpp/ChatRoom.js index e636abcbfe..92e9d9b70d 100644 --- a/modules/xmpp/ChatRoom.js +++ b/modules/xmpp/ChatRoom.js @@ -110,6 +110,8 @@ export default class ChatRoom extends Listenable { * @param {boolean} options.disableDiscoInfo - when set to {@code false} will skip disco info. * This is intended to be used only for lobby rooms. * @param {boolean} options.enableLobby - when set to {@code false} will skip creating lobby room. + * @param {boolean} options.hiddenFromRecorderFeatureEnabled - when set to {@code true} we will check identity tag + * for node presence. */ constructor(connection, jid, password, XMPP, options) { super(); @@ -488,7 +490,13 @@ export default class ChatRoom extends Listenable { if (userInfo) { identity.user = {}; - for (const tag of [ 'id', 'name', 'avatar' ]) { + const tags = [ 'id', 'name', 'avatar' ]; + + if (this.options.hiddenFromRecorderFeatureEnabled) { + tags.push('hidden-from-recorder'); + } + + for (const tag of tags) { const child = userInfo.children.find(c => c.tagName === tag); diff --git a/types/auto/JitsiParticipant.d.ts b/types/auto/JitsiParticipant.d.ts index 2d772de2c9..bc6c924ab5 100644 --- a/types/auto/JitsiParticipant.d.ts +++ b/types/auto/JitsiParticipant.d.ts @@ -116,7 +116,13 @@ export default class JitsiParticipant { */ isHidden(): boolean; /** - * @returns {Boolean} Wheter this participants replaces another participant + * @returns {Boolean} Whether this participant is a hidden participant. Some + * special system participants may want to join hidden (like for example the + * recorder). + */ + isHiddenFromRecorder(): boolean; + /** + * @returns {Boolean} Whether this participant replaces another participant * from the meeting. */ isReplacing(): boolean; diff --git a/types/auto/modules/xmpp/ChatRoom.d.ts b/types/auto/modules/xmpp/ChatRoom.d.ts index 0b5f7ece4c..56edb176a7 100644 --- a/types/auto/modules/xmpp/ChatRoom.d.ts +++ b/types/auto/modules/xmpp/ChatRoom.d.ts @@ -27,6 +27,8 @@ export default class ChatRoom extends Listenable { * @param {boolean} options.disableDiscoInfo - when set to {@code false} will skip disco info. * This is intended to be used only for lobby rooms. * @param {boolean} options.enableLobby - when set to {@code false} will skip creating lobby room. + * @param {boolean} options.hiddenFromRecorderFeatureEnabled - when set to {@code true} we will check identity tag + * for node presence. */ constructor(connection: XmppConnection, jid: any, password: any, XMPP: any, options: any); xmpp: any;