Fix request(Un)Mute/Deaf expecting observable instead of its content
This commit is contained in:
parent
d7b03d2192
commit
54b62b9964
|
@ -198,16 +198,16 @@
|
||||||
rel="information" src="/svg/information_icon.svg">
|
rel="information" src="/svg/information_icon.svg">
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<img class="tb-mute" data-bind="visible: !selfMute(),
|
<img class="tb-mute" data-bind="visible: !selfMute(),
|
||||||
click: function () { requestMute(thisUser) }"
|
click: function () { requestMute(thisUser()) }"
|
||||||
rel="mute" src="/svg/audio-input-microphone.svg">
|
rel="mute" src="/svg/audio-input-microphone.svg">
|
||||||
<img class="tb-unmute tb-active" data-bind="visible: selfMute,
|
<img class="tb-unmute tb-active" data-bind="visible: selfMute,
|
||||||
click: function () { requestUnmute(thisUser) }"
|
click: function () { requestUnmute(thisUser()) }"
|
||||||
rel="unmute" src="/svg/audio-input-microphone-muted.svg">
|
rel="unmute" src="/svg/audio-input-microphone-muted.svg">
|
||||||
<img class="tb-deaf" data-bind="visible: !selfDeaf(),
|
<img class="tb-deaf" data-bind="visible: !selfDeaf(),
|
||||||
click: function () { requestDeaf(thisUser) }"
|
click: function () { requestDeaf(thisUser()) }"
|
||||||
rel="deaf" src="/svg/audio-output.svg">
|
rel="deaf" src="/svg/audio-output.svg">
|
||||||
<img class="tb-undeaf tb-active" data-bind="visible: selfDeaf,
|
<img class="tb-undeaf tb-active" data-bind="visible: selfDeaf,
|
||||||
click: function () { requestUndeaf(thisUser) }"
|
click: function () { requestUndeaf(thisUser()) }"
|
||||||
rel="undeaf" src="/svg/audio-output-deafened.svg">
|
rel="undeaf" src="/svg/audio-output-deafened.svg">
|
||||||
<img class="tb-record" data-bind="click: function(){}"
|
<img class="tb-record" data-bind="click: function(){}"
|
||||||
rel="record" src="/svg/media-record.svg">
|
rel="record" src="/svg/media-record.svg">
|
||||||
|
|
16
app/index.js
16
app/index.js
|
@ -558,11 +558,11 @@ class GlobalBindings {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestMute = user => {
|
this.requestMute = user => {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.selfMute(true)
|
this.selfMute(true)
|
||||||
}
|
}
|
||||||
if (this.connected()) {
|
if (this.connected()) {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.client.setSelfMute(true)
|
this.client.setSelfMute(true)
|
||||||
} else {
|
} else {
|
||||||
user.model.setMute(true)
|
user.model.setMute(true)
|
||||||
|
@ -571,12 +571,12 @@ class GlobalBindings {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestDeaf = user => {
|
this.requestDeaf = user => {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.selfMute(true)
|
this.selfMute(true)
|
||||||
this.selfDeaf(true)
|
this.selfDeaf(true)
|
||||||
}
|
}
|
||||||
if (this.connected()) {
|
if (this.connected()) {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.client.setSelfDeaf(true)
|
this.client.setSelfDeaf(true)
|
||||||
} else {
|
} else {
|
||||||
user.model.setDeaf(true)
|
user.model.setDeaf(true)
|
||||||
|
@ -585,12 +585,12 @@ class GlobalBindings {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestUnmute = user => {
|
this.requestUnmute = user => {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.selfMute(false)
|
this.selfMute(false)
|
||||||
this.selfDeaf(false)
|
this.selfDeaf(false)
|
||||||
}
|
}
|
||||||
if (this.connected()) {
|
if (this.connected()) {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.client.setSelfMute(false)
|
this.client.setSelfMute(false)
|
||||||
} else {
|
} else {
|
||||||
user.model.setMute(false)
|
user.model.setMute(false)
|
||||||
|
@ -599,11 +599,11 @@ class GlobalBindings {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestUndeaf = user => {
|
this.requestUndeaf = user => {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.selfDeaf(false)
|
this.selfDeaf(false)
|
||||||
}
|
}
|
||||||
if (this.connected()) {
|
if (this.connected()) {
|
||||||
if (user === this.thisUser) {
|
if (user === this.thisUser()) {
|
||||||
this.client.setSelfDeaf(false)
|
this.client.setSelfDeaf(false)
|
||||||
} else {
|
} else {
|
||||||
user.model.setDeaf(false)
|
user.model.setDeaf(false)
|
||||||
|
|
Loading…
Reference in a new issue