mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
fix: no voice in speech page; custom personal page redirect notworking. feat: sync sroll bar between question display page an obs component
This commit is contained in:
@@ -76,7 +76,7 @@ const defaultConfig: DanmujiConfig = {
|
||||
} as DanmujiConfig
|
||||
let textEmoticons: { keyword: string, url: string }[] = []
|
||||
const config = ref<DanmujiConfig>(JSON.parse(JSON.stringify(defaultConfig)))
|
||||
const rtc = useWebRTC().Init('slave')
|
||||
const rtc = await useWebRTC().Init('slave')
|
||||
|
||||
const emoticonsTrie = computed(() => {
|
||||
let res = new trie.Trie()
|
||||
|
||||
@@ -23,7 +23,7 @@ const route = useRoute()
|
||||
const currentId = computed(() => {
|
||||
return props.id ?? route.query.id
|
||||
})
|
||||
const rtc = useWebRTC().Init('slave')
|
||||
const rtc = await useWebRTC().Init('slave')
|
||||
|
||||
const listContainerRef = ref()
|
||||
const footerRef = ref()
|
||||
|
||||
@@ -9,11 +9,13 @@ import { useWebRTC } from '@/store/useRTC'
|
||||
|
||||
const hash = ref('')
|
||||
const token = useRouteQuery('token')
|
||||
const rtc = useWebRTC().Init('slave')
|
||||
const rtc = await useWebRTC().Init('slave')
|
||||
|
||||
const question = ref<QAInfo>()
|
||||
const setting = ref<Setting_QuestionDisplay>({} as Setting_QuestionDisplay)
|
||||
|
||||
const cardRef = ref()
|
||||
|
||||
async function checkIfChanged() {
|
||||
try {
|
||||
const data = await QueryGetAPI<string>(QUESTION_API_URL + 'get-hash', {
|
||||
@@ -45,6 +47,9 @@ async function getQuestionAndSetting() {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
function handleScroll(value: { clientHeight: number, scrollHeight: number, scrollTop: number }) {
|
||||
cardRef.value?.setScroll(value)
|
||||
}
|
||||
|
||||
const visiable = ref(true)
|
||||
const active = ref(true)
|
||||
@@ -66,12 +71,16 @@ onMounted(() => {
|
||||
active.value = a
|
||||
}
|
||||
}
|
||||
|
||||
rtc?.on('function.question.sync-scroll', handleScroll)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer)
|
||||
|
||||
rtc?.off('function.question.sync-scroll', handleScroll)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QuestionDisplayCard :question="question" :setting="setting" />
|
||||
<QuestionDisplayCard ref="cardRef" :question="question" :setting="setting" />
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,7 @@ const route = useRoute()
|
||||
const currentId = computed(() => {
|
||||
return props.id ?? route.query.id
|
||||
})
|
||||
const rtc = useWebRTC().Init('slave')
|
||||
const rtc = await useWebRTC().Init('slave')
|
||||
|
||||
const listContainerRef = ref()
|
||||
const footerRef = ref()
|
||||
|
||||
Reference in New Issue
Block a user