Skip to content

Commit

Permalink
fix(unmute): set initial volume to the current output audio volume on…
Browse files Browse the repository at this point in the history
… unmute
  • Loading branch information
maljuburi authored and stavares843 committed Jun 3, 2022
1 parent 148a39c commit ba12551
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/views/media/user/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ 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 audioStreamElement = document.getElementById(
'audio-stream',
) as HTMLAudioElement
audioStreamElement.volume = this.audio.volume / 100
}
},
})
</script>

Expand Down

0 comments on commit ba12551

Please sign in to comment.