diff --git a/src/components/widgets/VideoPlayer.vue b/src/components/widgets/VideoPlayer.vue index 89771dd14..b8539f29f 100644 --- a/src/components/widgets/VideoPlayer.vue +++ b/src/components/widgets/VideoPlayer.vue @@ -150,7 +150,7 @@ watch(selectedICEIPsField, () => { }) setInterval(() => { - const combinedIps = [...videoStore.availableIceIps, ...availableICEIPs.value] + const combinedIps = [...(videoStore.availableIceIps ?? []), ...availableICEIPs.value] const uniqueIps = combinedIps.filter((value, index, array) => array.indexOf(value) === index) videoStore.availableIceIps = uniqueIps }, 1000) diff --git a/src/stores/video.ts b/src/stores/video.ts index 0d534fd93..9184eece2 100644 --- a/src/stores/video.ts +++ b/src/stores/video.ts @@ -3,10 +3,10 @@ import { saveAs } from 'file-saver' import localforage from 'localforage' import { defineStore } from 'pinia' import Swal from 'sweetalert2' -import { reactive } from 'vue' +import { ref } from 'vue' export const useVideoStore = defineStore('video', () => { - const availableIceIps = reactive([]) + const availableIceIps = ref(undefined) const allowedIceIps = useStorage('cockpit-allowed-stream-ips', []) // Offer download of backuped videos