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 committed Jun 2, 2022
1 parent cd2cf7e commit 519a8e8
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 519a8e8

Please sign in to comment.