summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-05-25 06:48:21 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-06-21 19:03:19 +0200
commitb29647bd739f5cb8ec21fe104300a1bbed8c4d0d (patch)
tree55fbe4be46533d4e8d2474f56e09192eb63758ab
parent9c5aad76f292601fd8d314a3ee351da49348f22c (diff)
Replace anonymous with arrow function so "this" is properly defined
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--src/utils/webrtc/simplewebrtc/localmedia.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/webrtc/simplewebrtc/localmedia.js b/src/utils/webrtc/simplewebrtc/localmedia.js
index 890961dd4..ad7e84903 100644
--- a/src/utils/webrtc/simplewebrtc/localmedia.js
+++ b/src/utils/webrtc/simplewebrtc/localmedia.js
@@ -634,8 +634,8 @@ LocalMedia.prototype.resume = function() {
LocalMedia.prototype._setAudioEnabled = function(bool) {
this._audioEnabled = bool
- this.localStreams.forEach(function(stream) {
- stream.getAudioTracks().forEach(function(track) {
+ this.localStreams.forEach(stream => {
+ stream.getAudioTracks().forEach(track => {
track.enabled = !!bool
})
})
@@ -643,8 +643,8 @@ LocalMedia.prototype._setAudioEnabled = function(bool) {
LocalMedia.prototype._setVideoEnabled = function(bool) {
this._videoEnabled = bool
- this.localStreams.forEach(function(stream) {
- stream.getVideoTracks().forEach(function(track) {
+ this.localStreams.forEach(stream => {
+ stream.getVideoTracks().forEach(track => {
track.enabled = !!bool
})
})