QuickBlox Opponent Video and audio stream is not coming?

1.1k Views Asked by At

I am using QuickBlox SDk for video calling. When i call from one user to another, I received the call from that user but opponent video and voice stream is not received? Can you please suggest me how can i resolve this problem. Even when I am trying Quickblox's demo app, then also I am getting same issue. Every delegate method is getting called. no error is coming up but stream is not working. Please help

Thanks in advance!

2

There are 2 best solutions below

0
On

I have the same issue

Solution

I have implemented this below line in receivedRemoteVideoTrack delegate method

func session(session: QBRTCSession!, receivedRemoteVideoTrack videoTrack: QBRTCVideoTrack!, fromUser userID: NSNumber!) {
   //solve issue by this line
   self.session!.localMediaStream.videoTrack.videoCapture = self.videoCapture
   self.opponentVideoView?.setVideoTrack(videoTrack) 
}

refrence :- https://quickblox.com/developers/Sample-webrtc-ios

0
On

Try below code:

let opponentVideoTrack = QBRTCRemoteVideoView(frame: someFrame)
view.insertSubview(self.opponentVideoTrack)

Do following in receivedRemoteVideoTrack delegate method

func session(session: QBRTCSession!, receivedRemoteVideoTrack videoTrack: QBRTCVideoTrack!, fromUser userID: NSNumber!) {
    self.callStatus.text = "Getting Video Call "      
    self.opponentVideoTrack!.setVideoTrack(videoTrack)
}

And don't forget to add QBRTCCameraCapture object in initializedLocalMediaStream delegate method like below example

func session(session: QBRTCSession!, initializedLocalMediaStream mediaStream: QBRTCMediaStream!) {
    self.currentSession!.localMediaStream.videoTrack.videoCapture = self.myVideoCapture
}

where self.myVideoCapture is instance of QBRTCCameraCapture.

Let me know if this works for you.