mediasoup-client-swift icon indicating copy to clipboard operation
mediasoup-client-swift copied to clipboard

Video capture function missing

Open HarshSurati-Jio opened this issue 2 years ago • 3 comments

[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)_

HarshSurati-Jio avatar Jun 21 '23 11:06 HarshSurati-Jio

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:

  • is it Swift or Objective-C?
  • how do you integrate mediasoup-client-swift into your project?
  • do you use any other WebRTC-based libraries on your project?
  • do you have any custom options for library search paths in your target settings?

fedulvtubudul avatar Jun 26 '23 03:06 fedulvtubudul

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

HarshSurati-Jio avatar Jun 28 '23 07:06 HarshSurati-Jio

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'

lets-swapcode avatar Jul 06 '23 12:07 lets-swapcode