easyRTC - Change dimension of video.

751 views
Skip to first unread message

duong phan

unread,
May 15, 2014, 11:36:39 PM5/15/14
to eas...@googlegroups.com
How to change dimension of video before and after video is transfer ?
I used SetVideoDims(width,height)  but it's not effect.
Thanks

Message has been deleted

Ramin Dərvişov

unread,
May 16, 2014, 2:53:45 AM5/16/14
to eas...@googlegroups.com
SetVideoDims : This function is used to set the dimensions of the local camera, usually to get HD. If called, it must be called before calling easyrtc.initMediaSource (explicitly or implicitly). assuming it is supported. If you don't pass any parameters, it will default to 720p dimensions.
But if you want set your screen size change video tag style.

<style>
#selfVideo { height:200px; width:250px; float:left; border:0px solid gray; margin-left:0px; }</style>
<video autoplay="autoplay" class="easyrtcMirror" id="selfVideo" muted="muted" volume="0" >
</video>

Eric Davies

unread,
May 16, 2014, 6:05:44 PM5/16/14
to eas...@googlegroups.com
Just to expand on Ramin's answer:

  • setVideoDims only works on Chrome (nag Mozilla if you want to see this in Firefox)
  • the video camera will only only produces a single resolution: if you have multiple tabs open that try to acquire the camera, the first one will be setting it (nag Google if you want to see this improved)
  • if you want to change the video resolution, you need to stop the mediaStream,  hangup on the other peer, reacquire the camera, and then call him again.

Hareen Madhusha

unread,
Nov 19, 2014, 12:38:53 AM11/19/14
to eas...@googlegroups.com
How to Change video dim and FPS in firefox

Ramin Dərvişov

unread,
Nov 23, 2014, 6:59:55 AM11/23/14
to eas...@googlegroups.com
easyrtc.setVideoBandwidth(45);
    easyrtc.setVideoDims(320, 240);

  
    easyrtc.initMediaSource(
            function() { ....

You can set frame rate value in setVideoDims.

easyrtc.setVideoDims = function(width, height) {
    if (!width) {
        width = 1280;
        height = 720;
    }

    easyrtc.videoFeatures = {
        mandatory: {
            minWidth: width,
            minHeight: height,
            maxWidth: width,
            maxHeight: height,
            minFrameRate: 5,
            maxFrameRate: 5

        },
        optional: []
    };
};

Eric Davies

unread,
Nov 24, 2014, 1:59:30 AM11/24/14
to eas...@googlegroups.com
Hi Ramin,

I think Hareen was asking about Firefox in particular, in which case I believe the answer is "Still impossible. Lodge complaints with Mozilla".

Ramin Dərvişov

unread,
Nov 24, 2014, 3:38:20 AM11/24/14
to eas...@googlegroups.com
i agree
Reply all
Reply to author
Forward
0 new messages