diff --git a/.github/workflows/azure-static-web-apps-wonderful-forest-0a9f5b103.yml b/.github/workflows/azure-static-web-apps-wonderful-forest-0a9f5b103.yml index b62f266..0728125 100644 --- a/.github/workflows/azure-static-web-apps-wonderful-forest-0a9f5b103.yml +++ b/.github/workflows/azure-static-web-apps-wonderful-forest-0a9f5b103.yml @@ -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: diff --git a/src/SlightCapture/video.js b/src/SlightCapture/video.js index 6610598..a929e0b 100644 --- a/src/SlightCapture/video.js +++ b/src/SlightCapture/video.js @@ -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)