提交 faef753a authored 作者: 王鹏飞's avatar 王鹏飞

fix: update user media request permissions in useLive composable and ensure…

fix: update user media request permissions in useLive composable and ensure autoStart is a boolean in live monitor
上级 7dcc4ab2
......@@ -32,7 +32,7 @@ export function useLive({ enabledUserMedia = true, onStart, onRecord, onStop }:
const currentTime = ref(0)
// 获取设备列表并设置默认设备
const { videoInputs: cameras, audioInputs: microphones } = useDevicesList({ requestPermissions: true })
const { videoInputs: cameras, audioInputs: microphones } = useDevicesList({ requestPermissions: enabledUserMedia })
const currentCamera = computed(() => cameras.value[0]?.deviceId)
const currentMicrophone = computed(() => microphones.value[0]?.deviceId)
......
......@@ -14,7 +14,7 @@ import { useAppConfig } from '@/composables/useAppConfig'
import { useLiveMonitor } from '@/composables/useLiveMonitor'
const appConfig = useAppConfig()
useLiveMonitor({ autoStart: appConfig.liveMonitor })
useLiveMonitor({ autoStart: !!appConfig.liveMonitor })
const Question = defineAsyncComponent(() => import('../components/Question.vue'))
const Info = defineAsyncComponent(() => import('../components/Info.vue'))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论