Agora) unity webgl sdk device counting and permission setting problem - agora.io

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?

Related

Agora Cloud Recording not working when single user Joins

I have implemented agora cloud recording and i am able to save recording files in Amazon S3. I am having issues in recorded video, where I am able to see one person only in my recording. Person who did not start recording.
Below are the steps.
Start Video Call
Other Person Joins call
Acquire - Start Recording - Query (Status 5) - Recording is working
Finish recording - recording uploaded success
Check recording in Amazon S3 (I am able to see another person in recoding but not myself)
I have subscribed to both UID, also tried subscribing using select all
"subscribeVideoUids": [ "#allstream#" ], "subscribeAudioUids": [ "#allstream#" ],
Need to understand what is incorrect. Please find the full request below.
{"cname":"1000","uid":"3924255811","clientRequest":{"token":"006d144dfdf7042dcc742acaca3c34af3afe220IAD6qWGaJzXtNJerzqvOQv1tItIa4sVXAb82LOj2vRAygRejJGdfUjEAAubpgRidf8lgXwEA","recordingConfig":{"maxIdleTime":30,"streamTypes":2,"channelType":0,"videoStreamType":1,"transcodingConfig":{"height":640,"width":360,"bitrate":500,"fps":15,"mixedVideoLayout":1,"maxResolutionUid":"3924255811","backgroundColor":"#000000"},"subscribeVideoUids":["#allstream#"],"subscribeAudioUids":["#allstream#"],"subscribeUidGroup":0},"recordingFileConfig":{"avFileType":["hls"]},"storageConfig":{"accessKey":"xxxxxxxx","region":14,"bucket":"dummybucket","secretKey":"xxxxxxxx","vendor":1}}}
In my experience, when only 1 user is recorded sometimes this is due to the recorder using the same UID as one of the users in the channel.
When calling the Agora Cloud Recording (acquire, start, stop) the UID should be unique from the users already in the channel.
Yes, This will not work if only a single user is present on the channel, below is the solution I applied to make it work.
Create a new or local client that will join the channel but do not create this client's audio and video track.
Now before proceeding to record, open a new window and on this window's load, create one more client (by doing the same as above) and this time allow to create it's audio and video track.
This newly created client will behave like a local client in this window and a remote client in the original window.
What happening here is-
The first time when we create a client, it joins the channel but not publishing any stream in the channel, but we have a UID of this client which we will use to send recording requests.
On the second time when we open a new window and create a new or local client, this client is a remote client for the original window (In which recording is taking place or is being requested) and this is the client who is being recorded.
Ideally, there are two users in the channel in which one is publishing the stream (newly window client) and another one is not publishing but requesting the recording (original window client). Logically, the user who is being recorded is the same in both windows with different uids.
To record a single user, there should be at least two unique uid in the channel from which one uid person can request to record and another uid person can be recorded.
Hope this will help.

Chat Conversion Not Displayed in View - QuickBlox iOS Setup

Chat conversion not become visible after I changed my QuickBlox account. Before developer has setup chatting for my iOS application with his personal QuickBlox account so I require to switch it with my company QuickBlox account and later on I can do purchase of plans without any barrier.
After this change actual send messages didn't become visible on both side devices before this was working properly after my account change it get stopped in working. I was getting few errors on log related to this so please check:
Though multiple users get created in account so definitely connection with QuickBlox has been establish as per my thinking but message passing not working.
In chatting view, I have sent many messages but nothing appear on screen, remain as it is blank.
After spending 2 days with this problem, I found solution for this problem. Posting here as an answer so that other users will not consume more time for this problem.
At QuickBlox dashboard, you have to enable retrieve users list permission so that other user can get list of others information. By default this flag set to disable so you have to enable it. Here is screenshot for the same:

Hangout App Instance for Multiple Users

I wrote a Google Hangout app that allows me to track basic information of the hangout, mostly whether or not it is still alive.
The first user starts the hangout (which also loads my hangout app), I pull the hangoutURL, and share it with another user who then joins the hangout as well.
The problem is that the app dies when that first user leaves the hangout, and I can no longer track the hangout.
Is there a way for the app to be loaded for each participant so that it isn't tied to that first user? I was thinking one solution would be that you could include the gid in the hangoutURL somehow for the second user, but couldn't find documentation on that.
You're spot on with your potential solution. You can add the gid parameter (along with the gd parameter, if you wish) to the URL for the hangout video chat, the same way you use the gid and gd parameters on the raw URL to bootstrap the hangout video chat.

hangout API event on exit

I created a Hangout API that works to send invites to certain users from my server by sending an ajax request from my app with hangout url etc.
For now I need hangout event on exit so that I can make another callback to my server indicating that particular hangout has been closed.
I know it sounds odd. I looked around on https://developers.google.com/+/hangouts/api/gapi.hangout but didn't get any such events.
Can I tweak it in some other way to get a notification on exit?
I think this was already answered on the Google forums. The short answer is no there is currently not an event to detect the exit of the Hangout.
You could have your app send a periodic heartbeat to your server and once you detect a timeout then you can conclude the hangout stopped.
Another approach might be to implement an onbeforeunload handler within your hangout app and use that to send a Ajax call back to your server each time a participant leaves or just when the final participant leaves. You can get the participant count from the API and might also be able to use the participantChanged event. Not sure if participantChanged event will fire if the last user exits the hangout by closing the window, that could be a route to explore too.
+1 what Brett said for the heartbeat. I would also optimize by only starting the heartbeat when there is one participant. It would be rare that everyone exists the hangout at the exact same time.
Darn solar flares!

iOS Push Notifications to specific user in the same deviceToken

I am using Urban Airship to test push notification and it went well.
My problem is how do I specify which user to get the notification not just the device token.
I mean in some situations where one device has multiple users, so many users registered the same device token to server.
Or do I have to do the filter on the device (client side) itself?
There's no real way to do what you want unfortunately. In APNS there's only such thing as a device. You push a device and it shows a message / badge / sound on that device.
If your app can have multiple users associated with it then you'd need to work out from the push which user it relates to and handle it accordingly. How you do that would depend on your app but you could add in a custom key to the push which indicated the user it's for.
If your app only ever has one user logged in at once then I suggest that when you hand the push token to your server, the server first turns off push for the user that the token was originally registered for and subsequently turns push on for the new user.