summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common')
-rw-r--r--src/client/app/common/views/components/media-banner.vue13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/app/common/views/components/media-banner.vue b/src/client/app/common/views/components/media-banner.vue
index 17e4dd6041..8a6f377f01 100644
--- a/src/client/app/common/views/components/media-banner.vue
+++ b/src/client/app/common/views/components/media-banner.vue
@@ -11,6 +11,7 @@
:title="media.name"
controls
ref="audio"
+ @volumechange="volumechange"
preload="metadata" />
</div>
<a class="download" v-else
@@ -40,7 +41,17 @@ export default Vue.extend({
return {
hide: true
};
- }
+ },
+ mounted() {
+ const audioTag = this.$refs.audio as HTMLAudioElement;
+ audioTag.volume = this.$store.state.device.mediaVolume;
+ },
+ methods: {
+ volumechange() {
+ const audioTag = this.$refs.audio as HTMLAudioElement;
+ this.$store.commit('device/set', { key: 'mediaVolume', value: audioTag.volume });
+ },
+ },
})
</script>