QuickBlox видео не получил видео strem - PullRequest
0 голосов
/ 10 января 2020

Мне нужно присоединиться к видеовызову по нажатию кнопки «СЕЙЧАС», для этого я создал пользователя после входа в систему и создал сеанс для пользователя и вызвал функцию receiveRemoteVideoTrack, но не получил видеопоток. Не могли бы вы, ребята, помочь мне с этим, какой шаг мне нужно сделать, и если я сделал какую-то ошибку. Ниже мой код для входа пользователя в систему и создания сеанса. Заранее спасибо

 let qbid2 = "492479" //qb_username
    let qbpass = "4hw148#ijeey@q4h3t4kjx" //qb_password

    QBRequest.logIn(withUserLogin: qbid2, password: qbpass, successBlock: { response, user in

        let currentUser = user

        currentUser.id = user.id // your current user's ID
        currentUser.password = user.password
        // your current user's password

        QBChat.instance.connect(withUserID: currentUser.id,
                                password:currentUser.password!,
                                completion: { [weak self] error in
                                    if let error = error {
                                    }
            }
        )
    }, errorBlock: { response in

        if let error1 = response.error {
            print("error: \(error1)")
            print("response",response)

        }
    })

//creating session
let opponentsIDs = [102138609]

let session = QBRTCClient.instance().createNewSession(withOpponents: opponentsIDs as [NSNumber], with: conferenceType) 
  // receivedRemoteVideoTrack
 func session(session: QBRTCSession!, receivedRemoteVideoTrack videoTrack: QBRTCVideoTrack!, fromUser userID: NSNumber!) {
        //self.opponentVideoView?.setVideoTrack(videoTrack)

        print(videoTrack)
    }

Below is the screen to JOIN The CAll or NOT

...