diff --git a/components/ui/Chat/TypingIndicator/TypingIndicator.vue b/components/ui/Chat/TypingIndicator/TypingIndicator.vue index 2ccede3e42..e53af64c0c 100644 --- a/components/ui/Chat/TypingIndicator/TypingIndicator.vue +++ b/components/ui/Chat/TypingIndicator/TypingIndicator.vue @@ -22,7 +22,7 @@ export default Vue.extend({ */ methods: { checkUsersTyping() { - if (this.users.length <= 3 && this.users.length != 0) { + if (this.users.length <= 3 && this.users.length) { return 1 } if (this.users.length > 3) { diff --git a/components/views/media/Media.vue b/components/views/media/Media.vue index 0c4cfe3a90..789a1c9416 100644 --- a/components/views/media/Media.vue +++ b/components/views/media/Media.vue @@ -203,6 +203,18 @@ export default Vue.extend({ }) } }, + 'audio.volume': { + handler(volume) { + // Bind stream audio element volume to slider volume + const audioStreamElements = document.getElementsByClassName( + 'remote-audio-stream', + ) as HTMLCollectionOf + + for (const audioStreamElement of audioStreamElements) { + audioStreamElement.volume = volume / 100 + } + }, + }, }, beforeMount() { // TODO: Create mixin/library that will handle call rejoining and closing diff --git a/components/views/media/user/User.html b/components/views/media/user/User.html index fc9bbffe42..24b7802c50 100644 --- a/components/views/media/user/User.html +++ b/components/views/media/user/User.html @@ -33,10 +33,11 @@ /> -
-
diff --git a/components/views/media/user/User.vue b/components/views/media/user/User.vue index e3c0c50709..d801d2be00 100644 --- a/components/views/media/user/User.vue +++ b/components/views/media/user/User.vue @@ -142,6 +142,18 @@ export default Vue.extend({ loadVideos() }) }, + updated() { + // When audio is streamed, initialize stream volume to current volume. + if (!this.isLocal && !this.audio.deafened && this.audioStream) { + const audioStreamElements = document.getElementsByClassName( + `remote-audio-stream`, + ) as HTMLCollectionOf + + for (const audioStreamElement of audioStreamElements) { + audioStreamElement.volume = this.audio.volume / 100 + } + } + }, }) diff --git a/components/views/settings/pages/realms/realm/index.vue b/components/views/settings/pages/realms/realm/index.vue index 51c822a411..25d0ab3517 100644 --- a/components/views/settings/pages/realms/realm/index.vue +++ b/components/views/settings/pages/realms/realm/index.vue @@ -9,7 +9,7 @@ export default Vue.extend({ props: { realm: { type: Object as PropType, - default: {}, + default: () => ({}), }, }, computed: {