Set the max camera resolution before commencing video streaming cont'd
This commit is contained in:
Vendored
+5
-4
@@ -18,12 +18,13 @@ function marhunPhotoCapturerFactory(modal_selector) {
|
||||
let canvas = document.createElement('canvas');
|
||||
|
||||
let captureImage = () => {
|
||||
let videoTag = modal.querySelector('.video-tag-overallmarhun.video-data');
|
||||
return new Promise(function (resolve, reject) {
|
||||
try {
|
||||
let modal = document.querySelector(modal_selector);
|
||||
let videoTag = modal.querySelector('.video-tag-overallmarhun.video-data');
|
||||
canvas.width = 1920;
|
||||
canvas.height = 1080;
|
||||
canvas.width = 3200;
|
||||
canvas.height = 1800;
|
||||
canvas.getContext("2d").drawImage(videoTag, 0, 0, canvas.width, canvas.height)
|
||||
resolve(canvas);
|
||||
} catch (error) {
|
||||
@@ -160,8 +161,8 @@ function marhunPhotoCapturerFactory(modal_selector) {
|
||||
function composeConstraint(camera) {
|
||||
|
||||
let constraints = {
|
||||
width: { exact: 3200 },
|
||||
height: { exact: 1800 },
|
||||
width: { exact: 1920 },
|
||||
height: { exact: 1080 },
|
||||
};
|
||||
|
||||
if (camera.deviceId !== '') {
|
||||
|
||||
Reference in New Issue
Block a user