aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings/settings.js
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2018-08-20 00:02:59 +0000
committerkaniini <nenolod@gmail.com>2018-08-20 00:02:59 +0000
commit65dfceae59de8c0a8d79168f345d16942695c573 (patch)
treee6faadd73fd3bc969693048f318f671ef22e56cd /src/components/settings/settings.js
parentd6b3394b790b72899b691e13196d05ec097ae1cc (diff)
parent702dfcec10290e86d04aa77fb921a64b6e7beb12 (diff)
Merge branch 'fixes-and-tweaks' into 'develop'
Fixes and tweaks See merge request pleroma/pleroma-fe!307
Diffstat (limited to 'src/components/settings/settings.js')
-rw-r--r--src/components/settings/settings.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js
index a26111d6..169b9080 100644
--- a/src/components/settings/settings.js
+++ b/src/components/settings/settings.js
@@ -1,3 +1,4 @@
+/* eslint-env browser */
import StyleSwitcher from '../style_switcher/style_switcher.vue'
import { filter, trim } from 'lodash'
@@ -7,11 +8,21 @@ const settings = {
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv,
hideNsfwLocal: this.$store.state.config.hideNsfw,
+ loopVideoLocal: this.$store.state.config.loopVideo,
+ loopVideoSilentOnlyLocal: this.$store.state.config.loopVideoSilentOnly,
muteWordsString: this.$store.state.config.muteWords.join('\n'),
autoLoadLocal: this.$store.state.config.autoLoad,
streamingLocal: this.$store.state.config.streaming,
+ pauseOnUnfocusedLocal: this.$store.state.config.pauseOnUnfocused,
hoverPreviewLocal: this.$store.state.config.hoverPreview,
- stopGifs: this.$store.state.config.stopGifs
+ stopGifs: this.$store.state.config.stopGifs,
+ loopSilentAvailable:
+ // Firefox
+ Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') ||
+ // Chrome-likes
+ Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
+ // Future spec, still not supported in Nightly 63 as of 08/2018
+ Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks')
}
},
components: {
@@ -32,12 +43,21 @@ const settings = {
hideNsfwLocal (value) {
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
},
+ loopVideoLocal (value) {
+ this.$store.dispatch('setOption', { name: 'loopVideo', value })
+ },
+ loopVideoSilentOnlyLocal (value) {
+ this.$store.dispatch('setOption', { name: 'loopVideoSilentOnly', value })
+ },
autoLoadLocal (value) {
this.$store.dispatch('setOption', { name: 'autoLoad', value })
},
streamingLocal (value) {
this.$store.dispatch('setOption', { name: 'streaming', value })
},
+ pauseOnUnfocusedLocal (value) {
+ this.$store.dispatch('setOption', { name: 'pauseOnUnfocused', value })
+ },
hoverPreviewLocal (value) {
this.$store.dispatch('setOption', { name: 'hoverPreview', value })
},