'Agora) unity webgl sdk device counting and permission setting problem
I wanted to automatically branch users who do not have a microphone or camera, so I used the GetAudioRecordingDeviceCount function in audioRecordingDeviceManager and GetVideoDeviceCount function in videoDeviceManager to branch users with 0 and more than 1 user.
However, the count is 0 for both functions before the first channel connection. I thought about this for a long time, but there was no answer, so I first connected to CLIENT_ROLE_AUDIENCE and modified it to turn on the camera and microphone using a toggle.
The camera works fine. If the EnableVideo function is operated in a branch with a count of 1 or more, a permission request is made and it operates normally.
However, the microphone does not work properly.
EnableAudio,EnableLocalAudio,MuteLocalAudioStream None of the microphone-related functions request the microphone's permission.
The only way was to set _publishLocalAudio to true in ChannelMediaOptions when doing JoinChannel.
However, I need microphone permission after entering the channel.
Is there no way to solve this in agora?
Count is 0 until the function that counts microphone and camera equipment enters and exits the channel once.
enablevideo requests camera permission, but enableaudio does not request microphone permission. Is there no way in the agora to request microphone permission after joining a channel?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|