Open amalnanavati opened 1 year ago
Thank you so much!
I tested this code and can confirm that it works and should be merged.
Without this fix network usage won't change even when you change width
and height
parameters in MJPEGCANVAS.Viewer on your website:
this.cameraViewer = new MJPEGCANVAS.Viewer({
divID: "camera-stream",
host: this.cameraAddress,
width: 640,
height: 480,
});
After the fix network usage changes with resolution change. Measure with Chrome Dev Tools Network tab
Public API Changes
None
Description
Before this PR the user-specified width and height parameters were getting overridden by the image's default width and height, preventing user-specified re-sizing. This bug was introduced in this commit. This PR addresses that bug by reverting to the functionality that user-specified width and height had before that commit.
In service of #119 .