Remember video mutality prefs on localStorage
This commit is contained in:
parent
4f61b8dc1c
commit
45ab63cfba
|
@ -292,6 +292,14 @@ const app = Vue.createApp({
|
||||||
if (localStorage.fontSizeClass != undefined) {
|
if (localStorage.fontSizeClass != undefined) {
|
||||||
this.fontSizeClass = localStorage.fontSizeClass;
|
this.fontSizeClass = localStorage.fontSizeClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Webcam mutality preferences from last broadcast.
|
||||||
|
if (localStorage.videoMutual === "true") {
|
||||||
|
this.webcam.mutual = true;
|
||||||
|
}
|
||||||
|
if (localStorage.videoMutualOpen === "true") {
|
||||||
|
this.webcam.mutualOpen = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
signIn() {
|
signIn() {
|
||||||
|
@ -932,6 +940,10 @@ const app = Vue.createApp({
|
||||||
this.webcam.elem.srcObject = stream;
|
this.webcam.elem.srcObject = stream;
|
||||||
this.webcam.stream = stream;
|
this.webcam.stream = stream;
|
||||||
|
|
||||||
|
// Save our mutuality prefs.
|
||||||
|
localStorage.videoMutual = this.webcam.mutual;
|
||||||
|
localStorage.videoMutualOpen = this.webcam.mutualOpen;
|
||||||
|
|
||||||
// Tell backend the camera is ready.
|
// Tell backend the camera is ready.
|
||||||
this.sendMe();
|
this.sendMe();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
|
@ -256,7 +256,6 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
:disabled="!webcam.mutual"
|
|
||||||
v-model="webcam.mutualOpen">
|
v-model="webcam.mutualOpen">
|
||||||
When someone opens my camera, I also open their camera automatically
|
When someone opens my camera, I also open their camera automatically
|
||||||
</label>
|
</label>
|
||||||
|
@ -387,7 +386,7 @@
|
||||||
'is-danger': webcam.nsfw}"
|
'is-danger': webcam.nsfw}"
|
||||||
@click.prevent="webcam.nsfw = !webcam.nsfw; sendMe()"
|
@click.prevent="webcam.nsfw = !webcam.nsfw; sendMe()"
|
||||||
title="Toggle the NSFW setting for your camera broadcast">
|
title="Toggle the NSFW setting for your camera broadcast">
|
||||||
<i class="fa fa-fire"></i>
|
<i class="fa fa-fire mr-1"></i> Explicit
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-narrow pl-1">
|
<div class="column is-narrow pl-1">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user