Commit c5bae676 authored by liujiaxin's avatar liujiaxin

feat:添加检测用户是否开启音视频权限功能

parent a4e226a0
......@@ -464,7 +464,6 @@ export function RoomPage({ children }: any) {
}
}
useEffect(() => {
console.log('~~~~~~~~~~~~~~~~')
navigator.permissions.query(
// { name: 'camera' }
{ name: 'microphone' }
......@@ -479,7 +478,8 @@ export function RoomPage({ children }: any) {
permissionStatus.onchange = function(){
checkPerMission(this.state);
}
})
});
navigator.permissions.query(
{ name: 'camera' }
).then(function(permissionStatus){
......@@ -487,7 +487,7 @@ export function RoomPage({ children }: any) {
permissionStatus.onchange = function(){
checkPerMission(this.state);
}
})
});
}, []);
useEffect(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment