Is it possible to open the camera view with out the publishing the stream ?

Ney

Member
Is it possible to open the camera view with out the publishing the stream? or in other terms can we have Open instance of RTCEAGLVideoView with out publishing the video.
 

Max

Administrator
Staff member
As I know, our iOS SDK does not support this feature.
I will be able to provide more accurate information tomorrow.
 

Max

Administrator
Staff member
Hello
We have changed one of our samples for iOS SDK
Here you can see how to test camera and microphone before publishing to server:
https://github.com/flashphoner/wcs-ios-sdk-samples/commit/43bdb048b039603ca75c78aad6cb3dd9747fdc0b
Code:
[FPWCSApi2 getMediaAccess:[_localControl toMediaConstraints] display:_videoView.local error:&error];
Example: Media Devices
https://github.com/flashphoner/wcs-ios-sdk-samples/tree/master/WCSExample/MediaDevices
It should work with latest iOS SDK
https://flashphoner.com/wcs-ios-sdk
 
  • Like
Reactions: Ney

Ney

Member
Hi Max I had tried the method as you had provided, but its not opening the camera

Here is my implementation

// Setting media constraint
- (FPWCSApi2MediaConstraints *)toMediaConstraints {

FPWCSApi2MediaConstraints *ret = [[FPWCSApi2MediaConstraintsalloc] init];
FPWCSApi2AudioConstraints *audio = [[FPWCSApi2AudioConstraintsalloc] init];
audio.bitrate = 500;
ret.audio = audio;
FPWCSApi2VideoConstraints *video = [[FPWCSApi2VideoConstraintsalloc] init];
video.minWidth = video.maxWidth = self.screenWidth;
video.minHeight = video.maxHeight = self.screenHeight;
video.minFrameRate = 500;
video.maxFrameRate = 500;
video.bitrate = 500;
ret.video = video;

return ret;

}


===
// Applying the method
NSError * errorToShowPreview = nil;

[FPWCSApi2getMediaAccess:[selftoMediaConstraints] display:self.videoViewLocalerror:&errorToShowPreview];

NSLog(@"error in showing default camera %@", errorToShowPreview.localizedDescription);


// I am getting errorToShowPreview = null
// error in showing default camera (null)
 

Max

Administrator
Staff member
It should work with our default Media Devices example.

Please build this example with latest version of iOS SDK and check if it works.
Building instruction:
https://flashphoner.com/docs/wcs5/w...er-guide-2/index.html?quick_start_ios_sdk.htm
If it works, try to adapt you code to our to get this working.
If it does not work, please report, we will check.

The same regarding loud speaker.
This works in Media Devices example. If you enable the loud speaker, you able to hear two dynamics simultaneously when you playback stream.

Latest samples:
https://github.com/flashphoner/wcs-ios-sdk-samples

Latest SDK
https://flashphoner.com/downloads/builds/flashphoner_client/wcs-ios-sdk/WCS-iOS-SDK-2.4.2.tar.gz

Building instruction:
https://flashphoner.com/docs/wcs5/w...er-guide-2/index.html?quick_start_ios_sdk.htm
 
Top