You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.ts 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. import { AnyAction } from 'redux';
  2. import { FaceLandmarks } from '../../face-landmarks/types';
  3. import { LOCKED_LOCALLY, LOCKED_REMOTELY } from '../../room-lock/constants';
  4. import { ISpeakerStats } from '../../speaker-stats/reducer';
  5. import { SET_CONFIG } from '../config/actionTypes';
  6. import { IConfig } from '../config/configType';
  7. import { CONNECTION_WILL_CONNECT, SET_LOCATION_URL } from '../connection/actionTypes';
  8. import { JitsiConferenceErrors } from '../lib-jitsi-meet';
  9. import ReducerRegistry from '../redux/ReducerRegistry';
  10. import { assign, equals, set } from '../redux/functions';
  11. import {
  12. AUTH_STATUS_CHANGED,
  13. CONFERENCE_FAILED,
  14. CONFERENCE_JOINED,
  15. CONFERENCE_LEFT,
  16. CONFERENCE_LOCAL_SUBJECT_CHANGED,
  17. CONFERENCE_PROPERTIES_CHANGED,
  18. CONFERENCE_SUBJECT_CHANGED,
  19. CONFERENCE_TIMESTAMP_CHANGED,
  20. CONFERENCE_WILL_JOIN,
  21. CONFERENCE_WILL_LEAVE,
  22. DATA_CHANNEL_CLOSED,
  23. DATA_CHANNEL_OPENED,
  24. LOCK_STATE_CHANGED,
  25. P2P_STATUS_CHANGED,
  26. SET_ASSUMED_BANDWIDTH_BPS,
  27. SET_FOLLOW_ME,
  28. SET_FOLLOW_ME_RECORDER,
  29. SET_OBFUSCATED_ROOM,
  30. SET_PASSWORD,
  31. SET_PENDING_SUBJECT_CHANGE,
  32. SET_ROOM,
  33. SET_START_MUTED_POLICY,
  34. SET_START_REACTIONS_MUTED,
  35. UPDATE_CONFERENCE_METADATA
  36. } from './actionTypes';
  37. import { isRoomValid } from './functions';
  38. const DEFAULT_STATE = {
  39. assumedBandwidthBps: undefined,
  40. conference: undefined,
  41. dataChannelOpen: undefined,
  42. e2eeSupported: undefined,
  43. joining: undefined,
  44. leaving: undefined,
  45. locked: undefined,
  46. membersOnly: undefined,
  47. metadata: undefined,
  48. password: undefined,
  49. passwordRequired: undefined,
  50. properties: undefined
  51. };
  52. export interface IConferenceMetadata {
  53. recording?: {
  54. isTranscribingEnabled: boolean;
  55. };
  56. visitors?: {
  57. live: boolean;
  58. };
  59. whiteboard?: {
  60. collabDetails: {
  61. roomId: string;
  62. roomKey: string;
  63. };
  64. };
  65. }
  66. export interface IJitsiConference {
  67. addCommandListener: Function;
  68. addLobbyMessageListener: Function;
  69. addTrack: Function;
  70. authenticateAndUpgradeRole: Function;
  71. avModerationApprove: Function;
  72. avModerationReject: Function;
  73. callUUID?: string;
  74. createVideoSIPGWSession: Function;
  75. dial: Function;
  76. disableAVModeration: Function;
  77. disableLobby: Function;
  78. enableAVModeration: Function;
  79. enableLobby: Function;
  80. end: Function;
  81. getBreakoutRooms: Function;
  82. getConnection: Function;
  83. getLocalParticipantProperty: Function;
  84. getLocalTracks: Function;
  85. getMeetingUniqueId: Function;
  86. getMetadataHandler: Function;
  87. getName: Function;
  88. getParticipantById: Function;
  89. getParticipantCount: Function;
  90. getParticipants: Function;
  91. getRole: Function;
  92. getSpeakerStats: () => ISpeakerStats;
  93. getSsrcByTrack: Function;
  94. getTranscriptionStatus: Function;
  95. grantOwner: Function;
  96. isAVModerationSupported: Function;
  97. isE2EEEnabled: Function;
  98. isE2EESupported: Function;
  99. isEndConferenceSupported: Function;
  100. isLobbySupported: Function;
  101. isP2PActive: Function;
  102. isSIPCallingSupported: Function;
  103. isStartAudioMuted: Function;
  104. isStartVideoMuted: Function;
  105. join: Function;
  106. joinLobby: Function;
  107. kickParticipant: Function;
  108. leave: Function;
  109. lobbyApproveAccess: Function;
  110. lobbyDenyAccess: Function;
  111. lock: Function;
  112. markParticipantVerified: Function;
  113. muteParticipant: Function;
  114. myLobbyUserId: Function;
  115. myUserId: Function;
  116. off: Function;
  117. on: Function;
  118. options: any;
  119. removeTrack: Function;
  120. replaceTrack: Function;
  121. room: IJitsiConferenceRoom;
  122. sendApplicationLog: Function;
  123. sendCommand: Function;
  124. sendCommandOnce: Function;
  125. sendEndpointMessage: Function;
  126. sendFaceLandmarks: (faceLandmarks: FaceLandmarks) => void;
  127. sendFeedback: Function;
  128. sendLobbyMessage: Function;
  129. sendMessage: Function;
  130. sendPrivateTextMessage: Function;
  131. sendReaction: Function;
  132. sendTextMessage: Function;
  133. sendTones: Function;
  134. sessionId: string;
  135. setAssumedBandwidthBps: (value: number) => void;
  136. setDesktopSharingFrameRate: Function;
  137. setDisplayName: Function;
  138. setIsSilent: Function;
  139. setLocalParticipantProperty: Function;
  140. setMediaEncryptionKey: Function;
  141. setReceiverConstraints: Function;
  142. setSenderVideoConstraint: Function;
  143. setStartMutedPolicy: Function;
  144. setSubject: Function;
  145. startRecording: Function;
  146. startVerification: Function;
  147. stopRecording: Function;
  148. toggleE2EE: Function;
  149. }
  150. export interface IConferenceState {
  151. assumedBandwidthBps?: number;
  152. authEnabled?: boolean;
  153. authLogin?: string;
  154. authRequired?: IJitsiConference;
  155. conference?: IJitsiConference;
  156. conferenceTimestamp?: number;
  157. dataChannelOpen?: boolean;
  158. e2eeSupported?: boolean;
  159. error?: Error;
  160. followMeEnabled?: boolean;
  161. followMeRecorderEnabled?: boolean;
  162. joining?: IJitsiConference;
  163. leaving?: IJitsiConference;
  164. lobbyWaitingForHost?: boolean;
  165. localSubject?: string;
  166. locked?: string;
  167. membersOnly?: IJitsiConference;
  168. metadata?: IConferenceMetadata;
  169. obfuscatedRoom?: string;
  170. obfuscatedRoomSource?: string;
  171. p2p?: Object;
  172. password?: string;
  173. passwordRequired?: IJitsiConference;
  174. pendingSubjectChange?: string;
  175. properties?: object;
  176. room?: string;
  177. startAudioMutedPolicy?: boolean;
  178. startReactionsMuted?: boolean;
  179. startVideoMutedPolicy?: boolean;
  180. subject?: string;
  181. }
  182. export interface IJitsiConferenceRoom {
  183. locked: boolean;
  184. myroomjid: string;
  185. roomjid: string;
  186. xmpp: {
  187. moderator: {
  188. logout: Function;
  189. };
  190. };
  191. }
  192. interface IConferenceFailedError extends Error {
  193. params: Array<any>;
  194. }
  195. /**
  196. * Listen for actions that contain the conference object, so that it can be
  197. * stored for use by other action creators.
  198. */
  199. ReducerRegistry.register<IConferenceState>('features/base/conference',
  200. (state = DEFAULT_STATE, action): IConferenceState => {
  201. switch (action.type) {
  202. case AUTH_STATUS_CHANGED:
  203. return _authStatusChanged(state, action);
  204. case CONFERENCE_FAILED:
  205. return _conferenceFailed(state, action);
  206. case CONFERENCE_JOINED:
  207. return _conferenceJoined(state, action);
  208. case CONFERENCE_SUBJECT_CHANGED:
  209. return set(state, 'subject', action.subject);
  210. case CONFERENCE_LOCAL_SUBJECT_CHANGED:
  211. return set(state, 'localSubject', action.localSubject);
  212. case CONFERENCE_PROPERTIES_CHANGED:
  213. return _conferencePropertiesChanged(state, action);
  214. case CONFERENCE_TIMESTAMP_CHANGED:
  215. return set(state, 'conferenceTimestamp', action.conferenceTimestamp);
  216. case CONFERENCE_LEFT:
  217. case CONFERENCE_WILL_LEAVE:
  218. return _conferenceLeftOrWillLeave(state, action);
  219. case CONFERENCE_WILL_JOIN:
  220. return _conferenceWillJoin(state, action);
  221. case CONNECTION_WILL_CONNECT:
  222. return set(state, 'authRequired', undefined);
  223. case DATA_CHANNEL_CLOSED:
  224. return set(state, 'dataChannelOpen', false);
  225. case DATA_CHANNEL_OPENED:
  226. return set(state, 'dataChannelOpen', true);
  227. case LOCK_STATE_CHANGED:
  228. return _lockStateChanged(state, action);
  229. case P2P_STATUS_CHANGED:
  230. return _p2pStatusChanged(state, action);
  231. case SET_ASSUMED_BANDWIDTH_BPS: {
  232. const assumedBandwidthBps = action.assumedBandwidthBps >= 0
  233. ? Number(action.assumedBandwidthBps)
  234. : undefined;
  235. return set(state, 'assumedBandwidthBps', assumedBandwidthBps);
  236. }
  237. case SET_FOLLOW_ME:
  238. return set(state, 'followMeEnabled', action.enabled);
  239. case SET_FOLLOW_ME_RECORDER:
  240. return { ...state,
  241. followMeRecorderEnabled: action.enabled,
  242. followMeEnabled: action.enabled
  243. };
  244. case SET_START_REACTIONS_MUTED:
  245. return set(state, 'startReactionsMuted', action.muted);
  246. case SET_LOCATION_URL:
  247. return set(state, 'room', undefined);
  248. case SET_OBFUSCATED_ROOM:
  249. return { ...state,
  250. obfuscatedRoom: action.obfuscatedRoom,
  251. obfuscatedRoomSource: action.obfuscatedRoomSource
  252. };
  253. case SET_PASSWORD:
  254. return _setPassword(state, action);
  255. case SET_PENDING_SUBJECT_CHANGE:
  256. return set(state, 'pendingSubjectChange', action.subject);
  257. case SET_ROOM:
  258. return _setRoom(state, action);
  259. case SET_START_MUTED_POLICY:
  260. return {
  261. ...state,
  262. startAudioMutedPolicy: action.startAudioMutedPolicy,
  263. startVideoMutedPolicy: action.startVideoMutedPolicy
  264. };
  265. case UPDATE_CONFERENCE_METADATA:
  266. return {
  267. ...state,
  268. metadata: action.metadata
  269. };
  270. case SET_CONFIG:
  271. return _setConfig(state, action);
  272. }
  273. return state;
  274. });
  275. /**
  276. * Processes subject and local subject of the conference based on the new config.
  277. *
  278. * @param {Object} state - The Redux state of feature base/conference.
  279. * @param {Action} action - The Redux action SET_CONFIG to reduce.
  280. * @private
  281. * @returns {Object} The new state after the reduction of the specified action.
  282. */
  283. function _setConfig(state: IConferenceState, { config }: { config: IConfig; }) {
  284. const { localSubject, subject } = config;
  285. return {
  286. ...state,
  287. localSubject,
  288. pendingSubjectChange: subject,
  289. subject: undefined
  290. };
  291. }
  292. /**
  293. * Reduces a specific Redux action AUTH_STATUS_CHANGED of the feature
  294. * base/conference.
  295. *
  296. * @param {Object} state - The Redux state of the feature base/conference.
  297. * @param {Action} action - The Redux action AUTH_STATUS_CHANGED to reduce.
  298. * @private
  299. * @returns {Object} The new state of the feature base/conference after the
  300. * reduction of the specified action.
  301. */
  302. function _authStatusChanged(state: IConferenceState,
  303. { authEnabled, authLogin }: { authEnabled: boolean; authLogin: string; }) {
  304. return assign(state, {
  305. authEnabled,
  306. authLogin
  307. });
  308. }
  309. /**
  310. * Reduces a specific Redux action CONFERENCE_FAILED of the feature
  311. * base/conference.
  312. *
  313. * @param {Object} state - The Redux state of the feature base/conference.
  314. * @param {Action} action - The Redux action CONFERENCE_FAILED to reduce.
  315. * @private
  316. * @returns {Object} The new state of the feature base/conference after the
  317. * reduction of the specified action.
  318. */
  319. function _conferenceFailed(state: IConferenceState, { conference, error }: {
  320. conference: IJitsiConference; error: IConferenceFailedError; }) {
  321. // The current (similar to getCurrentConference in
  322. // base/conference/functions.any.js) conference which is joining or joined:
  323. const conference_ = state.conference || state.joining;
  324. if (conference_ && conference_ !== conference) {
  325. return state;
  326. }
  327. let authRequired;
  328. let membersOnly;
  329. let passwordRequired;
  330. let lobbyWaitingForHost;
  331. switch (error.name) {
  332. case JitsiConferenceErrors.AUTHENTICATION_REQUIRED:
  333. authRequired = conference;
  334. break;
  335. case JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED:
  336. case JitsiConferenceErrors.MEMBERS_ONLY_ERROR: {
  337. membersOnly = conference;
  338. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  339. const [ _lobbyJid, _lobbyWaitingForHost ] = error.params;
  340. lobbyWaitingForHost = _lobbyWaitingForHost;
  341. break;
  342. }
  343. case JitsiConferenceErrors.PASSWORD_REQUIRED:
  344. passwordRequired = conference;
  345. break;
  346. }
  347. return assign(state, {
  348. authRequired,
  349. conference: undefined,
  350. e2eeSupported: undefined,
  351. error,
  352. joining: undefined,
  353. leaving: undefined,
  354. lobbyWaitingForHost,
  355. /**
  356. * The indicator of how the conference/room is locked. If falsy, the
  357. * conference/room is unlocked; otherwise, it's either
  358. * {@code LOCKED_LOCALLY} or {@code LOCKED_REMOTELY}.
  359. *
  360. * @type {string}
  361. */
  362. locked: passwordRequired ? LOCKED_REMOTELY : undefined,
  363. membersOnly,
  364. password: undefined,
  365. /**
  366. * The JitsiConference instance which requires a password to join.
  367. *
  368. * @type {JitsiConference}
  369. */
  370. passwordRequired
  371. });
  372. }
  373. /**
  374. * Reduces a specific Redux action CONFERENCE_JOINED of the feature
  375. * base/conference.
  376. *
  377. * @param {Object} state - The Redux state of the feature base/conference.
  378. * @param {Action} action - The Redux action CONFERENCE_JOINED to reduce.
  379. * @private
  380. * @returns {Object} The new state of the feature base/conference after the
  381. * reduction of the specified action.
  382. */
  383. function _conferenceJoined(state: IConferenceState, { conference }: { conference: IJitsiConference; }) {
  384. // FIXME The indicator which determines whether a JitsiConference is locked
  385. // i.e. password-protected is private to lib-jitsi-meet. However, the
  386. // library does not fire LOCK_STATE_CHANGED upon joining a JitsiConference
  387. // with a password.
  388. // FIXME Technically JitsiConference.room is a private field.
  389. const locked = conference.room?.locked ? LOCKED_REMOTELY : undefined;
  390. return assign(state, {
  391. authRequired: undefined,
  392. /**
  393. * The JitsiConference instance represented by the Redux state of the
  394. * feature base/conference.
  395. *
  396. * @type {JitsiConference}
  397. */
  398. conference,
  399. e2eeSupported: conference.isE2EESupported(),
  400. joining: undefined,
  401. membersOnly: undefined,
  402. leaving: undefined,
  403. lobbyWaitingForHost: undefined,
  404. /**
  405. * The indicator which determines whether the conference is locked.
  406. *
  407. * @type {boolean}
  408. */
  409. locked,
  410. passwordRequired: undefined
  411. });
  412. }
  413. /**
  414. * Reduces a specific redux action {@link CONFERENCE_LEFT} or
  415. * {@link CONFERENCE_WILL_LEAVE} for the feature base/conference.
  416. *
  417. * @param {Object} state - The redux state of the feature base/conference.
  418. * @param {Action} action - The redux action {@code CONFERENCE_LEFT} or
  419. * {@code CONFERENCE_WILL_LEAVE} to reduce.
  420. * @private
  421. * @returns {Object} The next/new state of the feature base/conference after the
  422. * reduction of the specified action.
  423. */
  424. function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
  425. { conference: IJitsiConference; type: string; }) {
  426. const nextState = { ...state };
  427. // The redux action CONFERENCE_LEFT is the last time that we should be
  428. // hearing from a JitsiConference instance.
  429. //
  430. // The redux action CONFERENCE_WILL_LEAVE represents the order of the user
  431. // to leave a JitsiConference instance. From the user's perspective, there's
  432. // no going back (with respect to the instance itself). The app will perform
  433. // due clean-up like leaving the associated room, but the instance is no
  434. // longer the focus of the attention of the user and, consequently, the app.
  435. for (const p in state) {
  436. if (state[p as keyof IConferenceState] === conference) {
  437. nextState[p as keyof IConferenceState] = undefined;
  438. switch (p) {
  439. case 'conference':
  440. case 'passwordRequired':
  441. // XXX Clear/unset locked & password for a conference which has
  442. // been LOCKED_LOCALLY or LOCKED_REMOTELY.
  443. delete nextState.locked;
  444. delete nextState.password;
  445. break;
  446. }
  447. }
  448. }
  449. if (type === CONFERENCE_WILL_LEAVE) {
  450. // A CONFERENCE_WILL_LEAVE is of further consequence only if it is
  451. // expected i.e. if the specified conference is joining or joined.
  452. if (conference === state.joining || conference === state.conference) {
  453. /**
  454. * The JitsiConference instance which is currently in the process of
  455. * being left.
  456. *
  457. * @type {JitsiConference}
  458. */
  459. nextState.leaving = conference;
  460. }
  461. }
  462. return nextState;
  463. }
  464. /**
  465. * Reduces a specific Redux action CONFERENCE_PROPERTIES_CHANGED of the feature
  466. * base/conference.
  467. *
  468. * @param {Object} state - The Redux state of the feature base/conference.
  469. * @param {Action} action - The Redux action CONFERENCE_PROPERTIES_CHANGED to reduce.
  470. * @private
  471. * @returns {Object} The new state of the feature base/conference after the
  472. * reduction of the specified action.
  473. */
  474. function _conferencePropertiesChanged(state: IConferenceState, { properties }: { properties: Object; }) {
  475. if (!equals(state.properties, properties)) {
  476. return assign(state, {
  477. properties
  478. });
  479. }
  480. return state;
  481. }
  482. /**
  483. * Reduces a specific Redux action CONFERENCE_WILL_JOIN of the feature
  484. * base/conference.
  485. *
  486. * @param {Object} state - The Redux state of the feature base/conference.
  487. * @param {Action} action - The Redux action CONFERENCE_WILL_JOIN to reduce.
  488. * @private
  489. * @returns {Object} The new state of the feature base/conference after the
  490. * reduction of the specified action.
  491. */
  492. function _conferenceWillJoin(state: IConferenceState, { conference }: { conference: IJitsiConference; }) {
  493. return assign(state, {
  494. error: undefined,
  495. joining: conference
  496. });
  497. }
  498. /**
  499. * Reduces a specific Redux action LOCK_STATE_CHANGED of the feature
  500. * base/conference.
  501. *
  502. * @param {Object} state - The Redux state of the feature base/conference.
  503. * @param {Action} action - The Redux action LOCK_STATE_CHANGED to reduce.
  504. * @private
  505. * @returns {Object} The new state of the feature base/conference after the
  506. * reduction of the specified action.
  507. */
  508. function _lockStateChanged(state: IConferenceState, { conference, locked }: { conference: Object; locked: boolean; }) {
  509. if (state.conference !== conference) {
  510. return state;
  511. }
  512. return assign(state, {
  513. locked: locked ? state.locked || LOCKED_REMOTELY : undefined,
  514. password: locked ? state.password : undefined
  515. });
  516. }
  517. /**
  518. * Reduces a specific Redux action P2P_STATUS_CHANGED of the feature
  519. * base/conference.
  520. *
  521. * @param {Object} state - The Redux state of the feature base/conference.
  522. * @param {Action} action - The Redux action P2P_STATUS_CHANGED to reduce.
  523. * @private
  524. * @returns {Object} The new state of the feature base/conference after the
  525. * reduction of the specified action.
  526. */
  527. function _p2pStatusChanged(state: IConferenceState, action: AnyAction) {
  528. return set(state, 'p2p', action.p2p);
  529. }
  530. /**
  531. * Reduces a specific Redux action SET_PASSWORD of the feature base/conference.
  532. *
  533. * @param {Object} state - The Redux state of the feature base/conference.
  534. * @param {Action} action - The Redux action SET_PASSWORD to reduce.
  535. * @private
  536. * @returns {Object} The new state of the feature base/conference after the
  537. * reduction of the specified action.
  538. */
  539. function _setPassword(state: IConferenceState, { conference, method, password }: {
  540. conference: IJitsiConference; method: Object; password: string; }) {
  541. switch (method) {
  542. case conference.join:
  543. return assign(state, {
  544. // 1. The JitsiConference which transitions away from
  545. // passwordRequired MUST remain in the redux state
  546. // features/base/conference until it transitions into
  547. // conference; otherwise, there is a span of time during which
  548. // the redux state does not even know that there is a
  549. // JitsiConference whatsoever.
  550. //
  551. // 2. The redux action setPassword will attempt to join the
  552. // JitsiConference so joining is an appropriate transitional
  553. // redux state.
  554. //
  555. // 3. The redux action setPassword will perform the same check
  556. // before it proceeds with the re-join.
  557. joining: state.conference ? state.joining : conference,
  558. locked: LOCKED_REMOTELY,
  559. /**
  560. * The password with which the conference is to be joined.
  561. *
  562. * @type {string}
  563. */
  564. password
  565. });
  566. case conference.lock:
  567. return assign(state, {
  568. locked: password ? LOCKED_LOCALLY : undefined,
  569. password
  570. });
  571. }
  572. return state;
  573. }
  574. /**
  575. * Reduces a specific Redux action SET_ROOM of the feature base/conference.
  576. *
  577. * @param {Object} state - The Redux state of the feature base/conference.
  578. * @param {Action} action - The Redux action SET_ROOM to reduce.
  579. * @private
  580. * @returns {Object} The new state of the feature base/conference after the
  581. * reduction of the specified action.
  582. */
  583. function _setRoom(state: IConferenceState, action: AnyAction) {
  584. let { room } = action;
  585. if (!isRoomValid(room)) {
  586. // Technically, there are multiple values which don't represent valid
  587. // room names. Practically, each of them is as bad as the rest of them
  588. // because we can't use any of them to join a conference.
  589. room = undefined;
  590. }
  591. /**
  592. * The name of the room of the conference (to be) joined.
  593. *
  594. * @type {string}
  595. */
  596. return assign(state, {
  597. error: undefined,
  598. room
  599. });
  600. }