Skip to content

Commit

Permalink
[mirotalk] - add 2k resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jun 22, 2022
1 parent db0302f commit 459f10c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion public/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ function setupLocalMedia(callback, errorback) {

console.log('Supported constraints', navigator.mediaDevices.getSupportedConstraints());

// default | qvgaVideo | vgaVideo | hdVideo | fhdVideo | 4kVideo |
// default | qvgaVideo | vgaVideo | hdVideo | fhdVideo | 2kVideo | 4kVideo |
let videoConstraints =
myBrowserName === 'Firefox' ? getVideoConstraints('useVideo') : getVideoConstraints('default');

Expand Down Expand Up @@ -2644,6 +2644,12 @@ function getVideoConstraints(videoQuality) {
height: { exact: 1080 },
frameRate: frameRate,
}; // video cam constraints very high bandwidth
case '2kVideo':
return {
width: { exact: 2560 },
height: { exact: 1440 },
frameRate: frameRate,
}; // video cam constraints ultra high bandwidth
case '4kVideo':
return {
width: { exact: 3840 },
Expand Down
1 change: 1 addition & 0 deletions public/views/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ <h1>Loading...</h1>
<option value="vgaVideo">VGA</option>
<option value="hdVideo">HD</option>
<option value="fhdVideo">FULL HD</option>
<option value="2kVideo">2k</option>
<option value="4kVideo">4K</option>
</select>
<br /><br />
Expand Down

0 comments on commit 459f10c

Please sign in to comment.