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

Can't see the video, the screen was still black #137

Open
gogocake opened this issue Oct 21, 2018 · 1 comment
Open

Can't see the video, the screen was still black #137

gogocake opened this issue Oct 21, 2018 · 1 comment

Comments

@gogocake
Copy link

Hi,
I'm trying to build this in Xcode, but when I build succeeded and run it, create a room and join it, waiting for someone to join this room.
But when I use another computer(Windows) to join this room, I can only see myself's screen in this computer(Windows), my Xcode's simulator is still waiting for some to join this room and the screen is black .....
How can I solve this problem , Thanks for any help!

@bhoomesh950
Copy link

@gogocake Hi .. I am also faced this issue with screen size then i have modified here please check once " ARDAppClient.h"

  • (RTCMediaConstraints *)defaultMediaStreamConstraints {

    NSLog(@"Screen size : %f",[[UIScreen mainScreen] bounds].size.height);
    if([[UIScreen mainScreen] bounds].size.height >= 667.0)
    {
    RTCMediaConstraints* constraints =[[RTCMediaConstraints alloc]
    initWithMandatoryConstraints:nil
    optionalConstraints:nil];
    return constraints;
    }else
    {
    RTCPair *minWidth = [[RTCPair alloc] initWithKey:@"minWidth" value:[NSString stringWithFormat:@"%f",[UIScreen mainScreen].bounds.size.width]];
    RTCPair *minHeight = [[RTCPair alloc] initWithKey:@"minHeight" value:[NSString stringWithFormat:@"%f",[UIScreen mainScreen].bounds.size.height]];
    NSArray *mandatory = @[ minWidth ,minHeight];

        RTCMediaConstraints* constraints =
            [[RTCMediaConstraints alloc]
                initWithMandatoryConstraints:mandatory
                         optionalConstraints:nil];
        return constraints;
    

    }
    }

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

2 participants