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

    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
    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;
    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)
  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:
    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
  7. Ney

    Ney Member

    I got this working now.

Share This Page