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

Discussion in 'Web Call Server 5' started by Ney, Jul 26, 2017.

  1. Ney

    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.
  2. Max

    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.
  3. Max

    Max Administrator Staff Member

    We have changed one of our samples for iOS SDK
    Here you can see how to test camera and microphone before publishing to server:
    [FPWCSApi2 getMediaAccess:[_localControl toMediaConstraints] display:_videoView.local error:&error];
    Example: Media Devices
    It should work with latest iOS SDK
    Ney likes this.
  4. 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; = 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; = 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)
  5. Ney

    Ney Member

    Checking in -- is there any update to resolve this? Thanks!
  6. Max

    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:
    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:

    Latest SDK

    Building instruction:
  7. Ney

    Ney Member

    I got this working now.

Share This Page