008645568c
Zoltan Bettenbuk suggested the following: const state = getState(); if (desiredTypes.length === 0) { - const { audio, video } = state['features/base/media']; - - audio.muted || desiredTypes.push(MEDIA_TYPE.AUDIO); - video.muted || desiredTypes.push(MEDIA_TYPE.VIDEO); + const startAudioOnly = getPropertyValue(state, 'startAudioOnly'); + const startWithAudioMuted + = getPropertyValue(state, 'startWithAudioMuted'); + const startWithVideoMuted + = getPropertyValue(state, 'startWithVideoMuted'); + + if (!startWithAudioMuted) { + desiredTypes.push(MEDIA_TYPE.AUDIO); + } + if (!startAudioOnly && !startWithVideoMuted) { + desiredTypes.push(MEDIA_TYPE.VIDEO); + } } const availableTypes The final commit is really a different implementation of the same idea but takes into account that the state of base/media already contains the intent of the URL and notices the delay in the realization of the background app state. Additionally, unbreaks one more case where setAudioOnly is incorrectly dispatched on CONFERENCE_LEFT or CONFERENCE_FAILED and, consequently, overrides the intent of the URL. |
||
---|---|---|
.. | ||
actionTypes.js | ||
actions.js | ||
functions.js | ||
index.js | ||
middleware.js | ||
reducer.js |