Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Apr 17, 2024
1 parent e9f112b commit 1571a96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
skip_app_build: true
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
app_location: "/storybook-static" # App source code path
api_location: "" # Api source code path - optional
output_location: "storybook-static" # Built app content directory - optional
#output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down
33 changes: 0 additions & 33 deletions src/SlightCapture/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,6 @@ const sligthCaptureDatabase = {

};

const _startCaptureStream = (resolve, iVideo ) => (stream) => {

if ("srcObject" in iVideo) {
iVideo.srcObject = stream;
} else {
iVideo.src = window.URL.createObjectURL(stream);
}

stream.getTracks().forEach(function(track) {
track.enabled = true;
});

iVideo.onloadedmetadata = async function (e) {
await iVideo.play();
let stream_settings = stream.getVideoTracks()[0].getSettings();

let src = new cv.Mat(stream_settings.height, stream_settings.width, cv.CV_8UC4);
iVideo.height = iVideo.videoHeight;
iVideo.width = iVideo.videoWidth;
let videoCapture = new cv.VideoCapture(iVideo);

const stopStreamTracks = () => {
stream.getTracks().forEach(function(track) {
track.stop();
track.enabled = true;
});
}

resolve({ videoCapture, src, stopStreamTracks});

}
}

const startCaptureAsync = cv =>(constraints, iVideo) => {
return new Promise((resolve, error) => {
navigator.mediaDevices.getUserMedia(constraints)
Expand Down

0 comments on commit 1571a96

Please sign in to comment.