2020-02-21 20:40:46 +00:00
|
|
|
import Vue from 'vue'
|
2020-03-01 03:37:02 +00:00
|
|
|
import { mapActions } from 'vuex'
|
2020-02-21 20:40:46 +00:00
|
|
|
import FtCard from '../ft-card/ft-card.vue'
|
|
|
|
import FtSelect from '../ft-select/ft-select.vue'
|
|
|
|
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
|
2020-02-27 03:10:56 +00:00
|
|
|
import FtSlider from '../ft-slider/ft-slider.vue'
|
2020-02-21 20:40:46 +00:00
|
|
|
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
name: 'PlayerSettings',
|
|
|
|
components: {
|
|
|
|
'ft-card': FtCard,
|
|
|
|
'ft-select': FtSelect,
|
|
|
|
'ft-toggle-switch': FtToggleSwitch,
|
2020-02-27 03:10:56 +00:00
|
|
|
'ft-slider': FtSlider,
|
2020-02-21 20:40:46 +00:00
|
|
|
'ft-flex-box': FtFlexBox
|
|
|
|
},
|
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
title: 'Player Settings',
|
|
|
|
formatNames: [
|
|
|
|
'Dash Formats',
|
|
|
|
'Legacy Formats',
|
|
|
|
'YouTube Player'
|
|
|
|
],
|
|
|
|
formatValues: [
|
|
|
|
'dash',
|
|
|
|
'legacy',
|
|
|
|
'youtube'
|
|
|
|
],
|
|
|
|
qualityNames: [
|
|
|
|
'Auto',
|
|
|
|
'144p',
|
|
|
|
'240p',
|
|
|
|
'360p',
|
|
|
|
'480p',
|
|
|
|
'720p',
|
|
|
|
'1080p',
|
|
|
|
'1440p',
|
|
|
|
'4k',
|
|
|
|
'8k'
|
|
|
|
],
|
|
|
|
qualityValues: [
|
|
|
|
'auto',
|
|
|
|
'144',
|
|
|
|
'240',
|
|
|
|
'360',
|
|
|
|
'480',
|
|
|
|
'720',
|
|
|
|
'1080',
|
|
|
|
'1440',
|
|
|
|
'4k',
|
|
|
|
'8k'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2020-03-01 03:37:02 +00:00
|
|
|
rememberHistory: function () {
|
|
|
|
return this.$store.getters.getRememberHistory
|
|
|
|
},
|
|
|
|
|
|
|
|
autoplayVideos: function () {
|
|
|
|
return this.$store.getters.getAutoplayVideos
|
|
|
|
},
|
|
|
|
|
|
|
|
autoplayPlaylists: function () {
|
|
|
|
return this.$store.getters.getAutoplayPlaylists
|
|
|
|
},
|
|
|
|
|
|
|
|
playNextVideo: function () {
|
|
|
|
return this.$store.getters.getPlayNextVideo
|
|
|
|
},
|
|
|
|
|
|
|
|
enableSubtitles: function () {
|
|
|
|
return this.$store.getters.getEnableSubtitles
|
|
|
|
},
|
|
|
|
|
|
|
|
forceLocalBackendForLegacy: function () {
|
|
|
|
return this.$store.getters.getForceLocalBackendForLegacy
|
|
|
|
},
|
|
|
|
|
|
|
|
proxyVideos: function () {
|
|
|
|
return this.$store.getters.getProxyVideos
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultVolume: function () {
|
|
|
|
return parseFloat(this.$store.getters.getDefaultVolume) * 100
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultPlayback: function () {
|
|
|
|
return parseFloat(this.$store.getters.getDefaultPlayback)
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultVideoFormat: function () {
|
|
|
|
return this.$store.getters.getDefaultVideoFormat
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultQuality: function () {
|
|
|
|
return this.$store.getters.getDefaultQuality
|
2020-02-21 20:40:46 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2020-03-01 03:37:02 +00:00
|
|
|
parseVolumeBeforeUpdate: function (volume) {
|
|
|
|
this.updateDefaultVolume(volume / 100)
|
|
|
|
},
|
|
|
|
|
|
|
|
...mapActions([
|
|
|
|
'updateRememberHistory',
|
|
|
|
'updateAutoplayVideos',
|
|
|
|
'updateAutoplayPlaylists',
|
|
|
|
'updatePlayNextVideo',
|
|
|
|
'updateEnableSubtitles',
|
|
|
|
'updateForceLocalBackendForLegacy',
|
|
|
|
'updateProxyVideos',
|
|
|
|
'updateDefaultVolume',
|
|
|
|
'updateDefaultPlayback',
|
|
|
|
'updateDefaultVideoFormat',
|
|
|
|
'updateDefaultQuality'
|
|
|
|
])
|
2020-02-21 20:40:46 +00:00
|
|
|
}
|
|
|
|
})
|