Using video chat instead of voice chat on online game ?

Hello, I am building an app that requires players joined to an online game session and to have a video chat with both of their front cameras turned on. I currently know that GameKit supports the voice chat option but could not find any source for video chat. Is it possible set up a video chat on an online game session?. What libraries can I use that have support in implementing the video chat (AVFoundation) ?

Your assistance is greatly appreciated.

Answered by DTS Engineer in 781259022

Hello @Useraugenkunst,

First, I recommend that you file an enhancement request for GameKit to add a video chat API using Feedback Assistant.

Having said that, it is possible to implement this functionality, though it is quite complex, here is a brief outline of steps:

  1. You establish a connection between the two devices (there are several options for this, but probably using Network.framework)
  2. Each device captures a video stream (using AVCaptureSession)
  3. Each device compresses their respective video stream (using VTCompressionSession)
  4. Each device sends their compressed stream to the other device over the connection
  5. Each receiving device decompresses and presents the received stream
Accepted Answer

Hello @Useraugenkunst,

First, I recommend that you file an enhancement request for GameKit to add a video chat API using Feedback Assistant.

Having said that, it is possible to implement this functionality, though it is quite complex, here is a brief outline of steps:

  1. You establish a connection between the two devices (there are several options for this, but probably using Network.framework)
  2. Each device captures a video stream (using AVCaptureSession)
  3. Each device compresses their respective video stream (using VTCompressionSession)
  4. Each device sends their compressed stream to the other device over the connection
  5. Each receiving device decompresses and presents the received stream

Hello @gchiste

Thank you for your response. I just had a question regarding the approach you suggested. Since the players are already connected via the GameKit matchmaking server, would it be necessary to establish a connection between the two players as you have explained on step 1 ?.

Using video chat instead of voice chat on online game ?
 
 
Q