2020-02-21 21:40:46 +01:00
|
|
|
import Vue from 'vue'
|
2020-03-01 04:37:02 +01:00
|
|
|
import { mapActions } from 'vuex'
|
2020-02-21 21:40:46 +01: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 04:10:56 +01:00
|
|
|
import FtSlider from '../ft-slider/ft-slider.vue'
|
2020-02-21 21:40:46 +01: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 04:10:56 +01:00
|
|
|
'ft-slider': FtSlider,
|
2020-02-21 21:40:46 +01:00
|
|
|
'ft-flex-box': FtFlexBox
|
|
|
|
},
|
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
formatValues: [
|
|
|
|
'dash',
|
|
|
|
'legacy',
|
2020-06-01 04:47:22 +02:00
|
|
|
'audio'
|
2020-02-21 21:40:46 +01:00
|
|
|
],
|
|
|
|
qualityValues: [
|
|
|
|
'auto',
|
2020-05-17 22:12:58 +02:00
|
|
|
144,
|
|
|
|
240,
|
|
|
|
360,
|
|
|
|
480,
|
|
|
|
720,
|
2020-09-07 20:43:44 +02:00
|
|
|
1080
|
2020-02-21 21:40:46 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2020-10-19 17:32:53 +02:00
|
|
|
backendPreference: function () {
|
|
|
|
return this.$store.getters.getBackendPreference
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
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
|
|
|
|
},
|
|
|
|
|
2021-08-05 22:17:01 +02:00
|
|
|
defaultSkipInterval: function () {
|
|
|
|
return parseInt(this.$store.getters.getDefaultSkipInterval)
|
|
|
|
},
|
|
|
|
|
2021-03-06 17:25:50 +01:00
|
|
|
defaultInterval: function () {
|
|
|
|
return parseInt(this.$store.getters.getDefaultInterval)
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
defaultVolume: function () {
|
2021-06-09 01:59:53 +02:00
|
|
|
return Math.round(parseFloat(this.$store.getters.getDefaultVolume) * 100)
|
2020-03-01 04:37:02 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
defaultPlayback: function () {
|
|
|
|
return parseFloat(this.$store.getters.getDefaultPlayback)
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultVideoFormat: function () {
|
|
|
|
return this.$store.getters.getDefaultVideoFormat
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultQuality: function () {
|
|
|
|
return this.$store.getters.getDefaultQuality
|
2020-04-22 04:59:09 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
defaultTheatreMode: function () {
|
|
|
|
return this.$store.getters.getDefaultTheatreMode
|
2020-08-07 02:20:42 +02:00
|
|
|
},
|
|
|
|
|
2020-10-06 15:38:35 +02:00
|
|
|
hideRecommendedVideos: function () {
|
|
|
|
return this.$store.getters.getHideRecommendedVideos
|
|
|
|
},
|
|
|
|
|
2021-05-26 17:55:11 +02:00
|
|
|
videoVolumeMouseScroll: function () {
|
|
|
|
return this.$store.getters.getVideoVolumeMouseScroll
|
|
|
|
},
|
|
|
|
|
2021-05-29 20:35:28 +02:00
|
|
|
displayVideoPlayButton: function () {
|
|
|
|
return this.$store.getters.getDisplayVideoPlayButton
|
|
|
|
},
|
|
|
|
|
2020-08-07 02:20:42 +02:00
|
|
|
formatNames: function () {
|
|
|
|
return [
|
|
|
|
this.$t('Settings.Player Settings.Default Video Format.Dash Formats'),
|
|
|
|
this.$t('Settings.Player Settings.Default Video Format.Legacy Formats'),
|
|
|
|
this.$t('Settings.Player Settings.Default Video Format.Audio Formats')
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
qualityNames: function () {
|
|
|
|
return [
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.Auto'),
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.144p'),
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.240p'),
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.360p'),
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.480p'),
|
|
|
|
this.$t('Settings.Player Settings.Default Quality.720p'),
|
2020-09-07 20:43:44 +02:00
|
|
|
this.$t('Settings.Player Settings.Default Quality.1080p')
|
2020-08-07 02:20:42 +02:00
|
|
|
]
|
2020-02-21 21:40:46 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2020-03-01 04:37:02 +01:00
|
|
|
...mapActions([
|
|
|
|
'updateAutoplayVideos',
|
|
|
|
'updateAutoplayPlaylists',
|
|
|
|
'updatePlayNextVideo',
|
|
|
|
'updateEnableSubtitles',
|
|
|
|
'updateForceLocalBackendForLegacy',
|
|
|
|
'updateProxyVideos',
|
2020-04-22 04:59:09 +02:00
|
|
|
'updateDefaultTheatreMode',
|
2021-08-05 22:17:01 +02:00
|
|
|
'updateDefaultSkipInterval',
|
2021-03-06 17:25:50 +01:00
|
|
|
'updateDefaultInterval',
|
2020-03-01 04:37:02 +01:00
|
|
|
'updateDefaultVolume',
|
|
|
|
'updateDefaultPlayback',
|
|
|
|
'updateDefaultVideoFormat',
|
2021-05-26 17:55:11 +02:00
|
|
|
'updateDefaultQuality',
|
2021-05-29 20:35:28 +02:00
|
|
|
'updateVideoVolumeMouseScroll',
|
|
|
|
'updateDisplayVideoPlayButton'
|
2020-03-01 04:37:02 +01:00
|
|
|
])
|
2020-02-21 21:40:46 +01:00
|
|
|
}
|
|
|
|
})
|