nubomediaTI / Kurento-iOS

Kurento Toolbox for iOS
Apache License 2.0
120 stars 76 forks source link

Update WebRTC.framework #38

Open tudorpopa39 opened 7 years ago

tudorpopa39 commented 7 years ago

Hello,

Could you please update the WebRTC.framework file? A new version 61.5.19063 was released soon, and I would like to use inside the KurentoToolbox.

https://github.com/Anakros/WebRTC

Thank you very much and best regards

smolskyaleksey commented 6 years ago

Hi, u can use my fork https://github.com/smolskyaleksey/Kurento-iOS

fsp-rts-2 commented 6 years ago

@smolskyaleksey hi, im using your fork version of kurento-ios but I keep on getting these 2 error in 'NBMTreeManager.m:

No visible @interface for 'NBMWebRTCPeer' declares the selector 'generateOffer:completion:' and

No visible @interface for 'NBMWebRTCPeer' declares the selector 'generateOffer:completion:'

Is there any way to solve it? thank you.

smolskyaleksey commented 6 years ago

Yes, sorry. Just delete last commit. Or use pod with explicitly commit. Example: pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'

smolskyaleksey commented 6 years ago

Also you can use new generateoffer method with bool flag NO(FALSE)

fsp-rts-2 commented 6 years ago

@smolskyaleksey How do i use the new generateoffer method with bool flag NO(FALSE) method? sorry to trouble you but I'm new to objective c

smolskyaleksey commented 6 years ago
[self generateOffer:<#connectionId#> withLocalPeer:NO completion:<#completion(sdpOffer, connection)#>;
fsp-rts-2 commented 6 years ago

@smolskyaleksey i delete the last commit, but it is still showing the same error.

smolskyaleksey commented 6 years ago

Can you show what do you do?

fsp-rts-2 commented 6 years ago

@smolskyaleksey i git reset 9633646 --hard then pod install then i clean and build. But the build got same errors. screen shot 2018-04-03 at 4 36 02 pm

smolskyaleksey commented 6 years ago

How did you call generateOffer method?

fsp-rts-2 commented 6 years ago

@smolskyaleksey should be this: -

 (void)generateOffer:(NSString *)connectionId completion:(void(^)(NSString *sdpOffer, NBMPeerConnection *connection))block {
    [self generateOffer:connectionId withDataChannels:NO completion:block];
 }
smolskyaleksey commented 6 years ago

Should works. Please clean and build pods and project

fsp-rts-2 commented 6 years ago

@smolskyaleksey i clean the whole build folder so now it is working. Thank you. By the way, do you know how to go into a room server? cause when i try, it give this error: screen shot 2018-04-03 at 7 37 17 pm

Utkarsh3441 commented 6 years ago

I am getting the same issue -[NBMRoomManager webRTCPeer:didCreateLocalCapturer:]: unrecognized selector sent to instance. Searched for the method declaration. Seems missing

smolskyaleksey commented 6 years ago

https://github.com/smolskyaleksey/Kurento-iOS/blob/master/Classes/Room/NBMRoom.h there is no NBMRoomManager in my classes.

smolskyaleksey commented 6 years ago

Look at https://github.com/smolskyaleksey/Kurento-iOS/blob/08c99e9f65959911d2bee2fcded89cdd2c60632b/Classes/WebRTC/NBMWebRTCPeer.m#L491

smolskyaleksey commented 6 years ago
    func startCall(withConfiguration configuration: NBMMediaConfiguration = NBMMediaConfiguration.default()) -> Void {
        let roomURL = NSURL(string: AppUrls.ROOM_SERVER)! as URL
        let room = NBMRoom(username:myNameInRoom, roomName:calleeID, roomURL:roomURL, dataChannels: false)
        let roomClient = NBMRoomClient(room: room, timeout: 15, delegate: self)
        if (roomClient?.connectionState == NBMRoomClientConnectionState.closed) {
            roomClient?.connect()
        }
        let peer = NBMWebRTCPeer(delegate: self, configuration: configuration)
        guard let webRTCManager = peer else {
            let error = NSError(domain: "com.mydomain",
                                code: 0,
                                userInfo: [NSLocalizedDescriptionKey : "Impossible to setup local media stream, check AUDIO & VIDEO permission"])
            self.delegate?.call(self, didFailWithError: error)
            return
        }
        let isStarted = webRTCManager.startLocalMedia()
        self.webRTCManager = webRTCManager
        self.roomClient = roomClient
        if isStarted {
            self.enableVideo(hasVideo)
            self.delegate?.call(self, didAddLocalStream: webRTCManager.localStream)
        }
    }

I used it like this

Utkarsh3441 commented 6 years ago

In NBMWebRTC.h, For NBMWebRTCPeerDelegateprotocol there is a method

This is being called inside - (RTCVideoTrack *)localVideoTrack { [_delegate webRTCPeer:self didCreateLocalCapturer:capturer];} method

But there is no definition for the same. Don't know why error console is printing error with NBMRoomManager

Utkarsh3441 commented 6 years ago

All other method definitions of NBMWebRTCPeerDelegate protocol are in NBMRoomManager except the missing one which are

Any help would be greatly appreciated as i am stuck here for quiet some time now.