summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-02-03 19:33:23 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-02-03 19:33:23 +0900
commit64c1075b06e2de944aa2151ca0d0936cad1c02bb (patch)
treea8a63df65f33547f849b89de1afd8539633e5f51 /src/client/app/common
parentNew translations ja-JP.yml (Korean) (#4110) (diff)
downloadmisskey-64c1075b06e2de944aa2151ca0d0936cad1c02bb.tar.gz
misskey-64c1075b06e2de944aa2151ca0d0936cad1c02bb.tar.bz2
misskey-64c1075b06e2de944aa2151ca0d0936cad1c02bb.zip
Remember the media playback volume (#4089)
* Remember the media playback volume * fix
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>