How to send video resolution 640x480 every time and in every device in webrtc ? i'm using following code
video: {
width: {
exact: 640
},
height: {
exact: 480
}
},
but its not working always. In forums as i understand CPU optimizes and shrinks resolution
You cannot reliably control the resolution of the video being sent.
The structure you have shown, when passed to getUserMedia
, controls the size of the video captured by the user's webcam. This video is later passed to WebRTC, which compresses it and adapts it to the available network throughput. If the network is slow, WebRTC will do one or more of the following:
While you cannot constrain the resolution of the video, you can influence the choice made by the video encoder by setting the track's contentHint
to the string detail
. This works fairly reliably in most cases, but the video encoder may still choose to reduce the resolution if the available throughput falls too low.