mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
fix event get
This commit is contained in:
@@ -4,10 +4,25 @@ import { onMounted, onUnmounted, ref } from 'vue'
|
||||
|
||||
const webFetcher = useWebFetcher()
|
||||
|
||||
onMounted(() => {
|
||||
webFetcher.Start()
|
||||
let timer: any
|
||||
onMounted(async () => {
|
||||
await webFetcher.Start()
|
||||
setTimeout(() => {
|
||||
// @ts-expect-error obs的东西
|
||||
if (!webFetcher.isStarted && window.obsstudio) {
|
||||
timer = setInterval(() => {
|
||||
if (webFetcher.isStarted) {
|
||||
return
|
||||
}
|
||||
webFetcher.Stop()
|
||||
webFetcher.Start()
|
||||
}, 20000)
|
||||
}
|
||||
}, 10000)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer)
|
||||
})
|
||||
onUnmounted(() => {})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user