fix(conference.js): crash on undefined
While on the prejoin screen, the local tracks are managed by the redux store and not conference.js, so localAudio is undefined.
This commit is contained in:
parent
bf714c1c8b
commit
7c90f75ec9
|
@ -2248,7 +2248,7 @@ export default {
|
||||||
return this.useAudioStream(stream);
|
return this.useAudioStream(stream);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (hasDefaultMicChanged) {
|
if (this.localAudio && hasDefaultMicChanged) {
|
||||||
// workaround for the default device to be shown as selected in the
|
// workaround for the default device to be shown as selected in the
|
||||||
// settings even when the real device id was passed to gUM because of the
|
// settings even when the real device id was passed to gUM because of the
|
||||||
// above mentioned chrome bug.
|
// above mentioned chrome bug.
|
||||||
|
@ -2588,7 +2588,7 @@ export default {
|
||||||
// Use the new stream or null if we failed to obtain it.
|
// Use the new stream or null if we failed to obtain it.
|
||||||
return useStream(tracks.find(track => track.getType() === mediaType) || null)
|
return useStream(tracks.find(track => track.getType() === mediaType) || null)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (hasDefaultMicChanged) {
|
if (this.localAudio && hasDefaultMicChanged) {
|
||||||
// workaround for the default device to be shown as selected in the
|
// workaround for the default device to be shown as selected in the
|
||||||
// settings even when the real device id was passed to gUM because of
|
// settings even when the real device id was passed to gUM because of
|
||||||
// the above mentioned chrome bug.
|
// the above mentioned chrome bug.
|
||||||
|
|
Loading…
Reference in New Issue