Open tudorpopa39 opened 7 years ago
Hi, u can use my fork https://github.com/smolskyaleksey/Kurento-iOS
@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.
Yes, sorry. Just delete last commit. Or use pod with explicitly commit. Example: pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'
Also you can use new generateoffer method with bool flag NO(FALSE)
@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
[self generateOffer:<#connectionId#> withLocalPeer:NO completion:<#completion(sdpOffer, connection)#>;
@smolskyaleksey i delete the last commit, but it is still showing the same error.
Can you show what do you do?
@smolskyaleksey i git reset 9633646 --hard then pod install then i clean and build. But the build got same errors.
How did you call generateOffer method?
@smolskyaleksey should be this: -
(void)generateOffer:(NSString *)connectionId completion:(void(^)(NSString *sdpOffer, NBMPeerConnection *connection))block {
[self generateOffer:connectionId withDataChannels:NO completion:block];
}
Should works. Please clean and build pods and project
@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:
I am getting the same issue -[NBMRoomManager webRTCPeer:didCreateLocalCapturer:]: unrecognized selector sent to instance. Searched for the method declaration. Seems missing
https://github.com/smolskyaleksey/Kurento-iOS/blob/master/Classes/Room/NBMRoom.h there is no NBMRoomManager in my classes.
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
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
All other method definitions of NBMWebRTCPeerDelegate protocol are in NBMRoomManager except the missing one which are
(void)webRTCPeer:(NBMWebRTCPeer )peer didCreateLocalCapturer:(RTCCameraVideoCapturer )localCapturer;
(void)webRTCPeer:(NBMWebRTCPeer )peer didCreateLocalFileCapturer:(RTCFileVideoCapturer )fileCapturer;
Any help would be greatly appreciated as i am stuck here for quiet some time now.
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