Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video capture function missing #13

Open
HarshSurati-Jio opened this issue Jun 21, 2023 · 3 comments
Open

Video capture function missing #13

HarshSurati-Jio opened this issue Jun 21, 2023 · 3 comments

Comments

@HarshSurati-Jio
Copy link

HarshSurati-Jio commented Jun 21, 2023

[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
Copy link
Collaborator

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?

@HarshSurati-Jio
Copy link
Author

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
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants