RTCMultiConnection Docs

RTCMultiConnection API Reference / "media" object

  1. "media" object allows you set media constraints.
  2. You can force constraints that should be used each time when getUserMedia API is invoked:
  3. // Enjoy full-hd video streaming
    connection.media.min(1920,1080);
    connection.media.max(1920,1080);
    
    // Enjoy hd video streaming
    connection.media.min(1280,720);
    connection.media.max(1280,720);
    
    // other possible values
    connection.media.min(960,720);
    connection.media.min(640,360); // -------- it is default
    connection.media.min(640,480);
    connection.media.min(320,240);
    connection.media.min(320,180);
    
    connection.media.minAspectRatio = 1.77;
    
  4. If above methods causes confusion; try "mandatory" constraints directly!
    connection.mediaConstraints.mandatory = {
        minWidth: 1280,
        maxWidth: 1280,
        minHeight: 720,
        maxHeight: 720,
        minFrameRate: 30
    };
    
    // it is same like "connection.session={audio:false}"
    connection.mediaConstraints.audio = false;
    

Want to ask a Question?

You can include your email for private conversation!