set global playlist start and length
This commit is contained in:
parent
4106b3c8bf
commit
872512a401
@ -1,6 +1,8 @@
|
|||||||
export const state = () => ({
|
export const state = () => ({
|
||||||
configGui: null,
|
configGui: null,
|
||||||
netChoices: [],
|
netChoices: [],
|
||||||
|
startInSec: null,
|
||||||
|
playlistLength: 86400.0,
|
||||||
configPlayout: [],
|
configPlayout: [],
|
||||||
currentUser: null,
|
currentUser: null,
|
||||||
configUser: null
|
configUser: null
|
||||||
@ -13,6 +15,12 @@ export const mutations = {
|
|||||||
UPDATE_NET_CHOICES (state, list) {
|
UPDATE_NET_CHOICES (state, list) {
|
||||||
state.netChoices = list
|
state.netChoices = list
|
||||||
},
|
},
|
||||||
|
UPDATE_START_TIME (state, sec) {
|
||||||
|
state.startInSec = sec
|
||||||
|
},
|
||||||
|
UPDATE_PLAYLIST_LENGTH (state, sec) {
|
||||||
|
state.playlistLength = sec
|
||||||
|
},
|
||||||
UPDATE_PLAYLOUT_CONFIG (state, config) {
|
UPDATE_PLAYLOUT_CONFIG (state, config) {
|
||||||
state.configPlayout = config
|
state.configPlayout = config
|
||||||
},
|
},
|
||||||
@ -84,6 +92,14 @@ export const actions = {
|
|||||||
const response = await this.$axios.get('api/player/config/?configPlayout')
|
const response = await this.$axios.get('api/player/config/?configPlayout')
|
||||||
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
if (response.data.playlist.day_start) {
|
||||||
|
commit('UPDATE_START_TIME', this.$timeToSeconds(response.data.playlist.day_start))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.data.playlist.length) {
|
||||||
|
commit('UPDATE_PLAYLIST_LENGTH', this.$timeToSeconds(response.data.playlist.length))
|
||||||
|
}
|
||||||
|
|
||||||
commit('UPDATE_PLAYLOUT_CONFIG', response.data)
|
commit('UPDATE_PLAYLOUT_CONFIG', response.data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user