Closed smyrgeorge closed 3 years ago
Choosing a specific resolution in WebRTC can be done by setting constraints when calling getUserMedia() locally, see: https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#properties_of_video_tracks
When using this library, the WebRTC stuff in encapuslated. You can try something as follows. I did not test this code (sorry for that). If you can share a complete repo / example its easier to reporduce / test / fix.
var constraints = {
video: {
height: {
ideal: 1080
},
width: {
ideal: 1920
}
}
};
this.createPeerConnection({
constraints
})
Hello!
Is there any way to set the video resolution? I'm trying to create a video room plugin.
According to the documentation, in order to set the video resolution we need to do something as follows:
The above piece of code is from janus
videoroomtest.js
file. Note thevideo: "hires"
. In this case everything worked fine, the resolution of the video was 1280x720.I tried to create something similar:
But it didn't work, the resolution was the default (640x480) Any help?