diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-03-17 05:22:31 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-03-17 05:22:31 +0300 |
commit | 69dffa6eda093cb88f1e09924a4b56735939cc20 (patch) | |
tree | 1f40ce313725e096a106d05cf861079460306e78 /src/utils | |
parent | 0915b5cd9a4edce97c10c29ceb7514b83b466a29 (diff) |
Replace code block with call to identical method
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/webrtc/models/LocalMediaModel.js | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/utils/webrtc/models/LocalMediaModel.js b/src/utils/webrtc/models/LocalMediaModel.js index b44b2a5c6..093135971 100644 --- a/src/utils/webrtc/models/LocalMediaModel.js +++ b/src/utils/webrtc/models/LocalMediaModel.js @@ -181,23 +181,7 @@ LocalMediaModel.prototype = { _setInitialState(localStream) { this.set('token', store.getters.getToken()) - if (localStream && localStream.getAudioTracks().length > 0) { - this.set('audioAvailable', true) - this.set('audioEnabled', localStream.getAudioTracks()[0].enabled) - } else { - this.disableAudio() - this.set('audioEnabled', false) - this.set('audioAvailable', false) - } - - if (localStream && localStream.getVideoTracks().length > 0) { - this.set('videoAvailable', true) - this.set('videoEnabled', localStream.getVideoTracks()[0].enabled) - } else { - this.disableVideo() - this.set('videoEnabled', false) - this.set('videoAvailable', false) - } + this._updateMediaAvailability(localStream) this.set('raisedHand', { state: false, timestamp: Date.now() }) }, |