summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/views/components
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/desktop/views/components
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/desktop/views/components')
-rw-r--r--src/client/app/desktop/views/components/media-video-dialog.vue11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/app/desktop/views/components/media-video-dialog.vue b/src/client/app/desktop/views/components/media-video-dialog.vue
index cb112e5266..3c682ecefb 100644
--- a/src/client/app/desktop/views/components/media-video-dialog.vue
+++ b/src/client/app/desktop/views/components/media-video-dialog.vue
@@ -1,7 +1,7 @@
<template>
<div class="mk-media-video-dialog">
<div class="bg" @click="close"></div>
- <video :src="video.url" :title="video.name" controls autoplay ref="video"/>
+ <video :src="video.url" :title="video.name" controls autoplay ref="video" @volumechange="volumechange"/>
</div>
</template>
@@ -18,8 +18,9 @@ export default Vue.extend({
duration: 100,
easing: 'linear'
});
- const videoTag = this.$refs.video as HTMLVideoElement
+ const videoTag = this.$refs.video as HTMLVideoElement;
if (this.start) videoTag.currentTime = this.start
+ videoTag.volume = this.$store.state.device.mediaVolume;
},
methods: {
close() {
@@ -30,7 +31,11 @@ export default Vue.extend({
easing: 'linear',
complete: () => this.destroyDom()
});
- }
+ },
+ volumechange() {
+ const videoTag = this.$refs.video as HTMLVideoElement;
+ this.$store.commit('device/set', { key: 'mediaVolume', value: videoTag.volume });
+ },
}
});
</script>