VLprojects / mediasoup-client-swift

Swift wrapper for libmediasoupclient
MIT License
42 stars 17 forks source link

Video capture function missing #13

Open HarshSurati-Jio opened 1 year ago

HarshSurati-Jio commented 1 year ago

[Update]

Looks like these functions are not available when trying to access using pod extensions. any reason why?

Earlier we were using objc version of this lib. (https://github.com/ethand91/mediasoup-ios-client https://github.com/VLprojects/libmediasoupclient)

In this we were able to capture and send the camera feed using below code - self.videoCapture = RTCCameraVideoCapturer(delegate: videoSource) guard let format = RTCCameraVideoCapturer.supportedFormats(for: cameraDevice).last else{return} let fps:Int = Int(format.videoSupportedFrameRateRanges.first?.maxFrameRate ?? 30) self.videoCapture?.startCapture(with: cameraDevice, format:format, fps: fps)

    Now in this swift version, there is nothing called as **RTCCameraVideoCapturer**.
    We can find **RTCVideoCapturer** but it doesn't have capture function and neither works directly. 

    please suggest here. _(In example also only audio transmission is present)_
fedulvtubudul commented 1 year ago

Hi @HarshSurati-Jio and thanks for your interest to our library.

Both mediasoup-ios-client and mediasoup-client-swift are wrappers for libmediasoupclient, while RTCCameraVideoCapturer is a class defined in WebRTC library. Please make sure you have imported it: import WebRTC.

To help you with integration, I need more info on your project setup:

HarshSurati-Jio commented 1 year ago

hey, thanks for the reply.

Please check the attachment for the error -

'RTCEAGLVideoView' is unavailable in application extensions for iOS: Rendering not available in app extensions. 'RTCCameraVideoCapturer' is unavailable in application extensions for iOS: Camera not available in app extensions.

To answer your questions- is it Swift or Objective-C? >>

extension error

Swift how do you integrate mediasoup-client-swift into your project? >> Cocoapods do you use any other WebRTC-based libraries on your project? >> no, just socket io for communication do you have any custom options for library search paths in your target settings? >> no

lets-swapcode commented 1 year ago

currently we made it work by changing one setting in pod install but looks like it is a risk.

  config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'