DEV Community

Discussion on: How to Embed Video Chat in your Unity Games

 
joelthomas362 profile image
Joel

Hey Dave,
I understood the question in the context of my tutorial, however these questions seem like they're related to a project you're working on. If you provide me more information I'll help out the best I can. Cheers!

Thread Thread
 
daveaccenture profile image
DaveAccenture

Yes thanks. I'm working on a VR app wherein we want one person at a time to present their webcam video to other players. So anyone can 'become broadcaster' and that locks everyone else to Audience until that person stops broacasting. Your tutorial was the best thing I could find that came close to what I need. I thought I could just change a few little things around, like set the profile, and change Role, etc. For the most part this was true. But I ran into issues. For one thing, we want to be able to have the video broadcaster to start with 'local camera on' so they can preview themselves before broadcasting, then hit a 'broadcast' button to send the video to other players. And, a 'stop broadcast' to go back to preview. There seem to be a handful of API's related to this. I finally got it (almost) working by turning on the local video, and using 'MuteVideo' to turn broadcasting on/off. In my case, each player's avatar would have the video (when being broadcast) above their head. So I need to associate a Photon player ID with an Agora user id when they join the channel, and display the correct broadcaster's video above the correct avatar.

Thread Thread
 
joelthomas362 profile image
Joel

Ok I'm glad you're making progress!
You might have already seen/know this, but when a player joins a channel, you can assign your own UID to them, instead of allowing Agora to create a random UID during channel join. So it may be possible to pass in the Photon ID into the UID parameter for consistency.

Thread Thread
 
daveaccenture profile image
DaveAccenture

I did not know that, great idea, thank you!