From 7ebc3ea6af28a9fe58a4c389715875060feb8d61 Mon Sep 17 00:00:00 2001 From: Prakhar Shukla Date: Mon, 24 Jul 2023 16:20:56 +0530 Subject: [PATCH 01/11] adding status badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 54718a5..a576c72 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Budibase Camera (beta) +[![Release](https://github.com/Netix-AI-RnD/budibase-component-camera/actions/workflows/release.yml/badge.svg)](https://github.com/Netix-AI-RnD/budibase-component-camera/actions/workflows/release.yml) ![budibase camera demo](https://user-images.githubusercontent.com/110921612/209187286-58d8ae54-1275-4ed6-b7de-6cedf15a80ec.gif) From a2371431372beb99721eee57c840f2d842de03bc Mon Sep 17 00:00:00 2001 From: Prakhar Shukla Date: Mon, 24 Jul 2023 16:32:17 +0530 Subject: [PATCH 02/11] new tagged release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e7cbff..4e1996c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "camera", - "version": "0.7.0", + "version": "0.7.1", "description": "Take pictures in Budibase 📸", "license": "MIT", "svelte": "index.js", From 909cae09a06576294e81c64a9319d0b5b80969b1 Mon Sep 17 00:00:00 2001 From: Prakhar Shukla Date: Mon, 24 Jul 2023 16:33:24 +0530 Subject: [PATCH 03/11] fix for permissions --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afaa6dc..46283a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: Release +permissions: + contents: write + on: push: branches: From 3614bb7f0e3fdf07ed4aff7771e9c6b59b390d4c Mon Sep 17 00:00:00 2001 From: Prakhar Shukla Date: Mon, 24 Jul 2023 16:37:58 +0530 Subject: [PATCH 04/11] working build --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46283a8..555be51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ name: Release +# Fix for broken build: https://github.com/softprops/action-gh-release/issues/236 permissions: contents: write From 3109892ac5cfcc9052d85909b9775d1a28489ec3 Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 10:01:42 +0530 Subject: [PATCH 05/11] Version update and camera capture safari --- package.json | 2 +- src/Component.svelte | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e1996c..b28f28b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "camera", - "version": "0.7.1", + "version": "0.7.2", "description": "Take pictures in Budibase 📸", "license": "MIT", "svelte": "index.js", diff --git a/src/Component.svelte b/src/Component.svelte index 7952115..522d955 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -61,6 +61,10 @@ imageCapture = new ImageCapture(track); videoSource.srcObject = stream; + // Fix for iOS Safari from https://leemartin.dev/hello-webrtc-on-safari-11-e8bcb5335295 + videoSource.setAttribute("autoplay", ""); + videoSource.setAttribute("muted", ""); + videoSource.setAttribute("playsinline", ""); videoSource.play(); videoSource = videoSource; From 64537dd7528f31c7da0d5f39e84e9d0e6d03d031 Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 10:40:43 +0530 Subject: [PATCH 06/11] Version update and ImageCapture polyfill --- package.json | 3 ++- src/Component.svelte | 1 + src/global.d.ts | 1 + yarn.lock | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/global.d.ts diff --git a/package.json b/package.json index b28f28b..cda2c06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "camera", - "version": "0.7.2", + "version": "0.7.3", "description": "Take pictures in Budibase 📸", "license": "MIT", "svelte": "index.js", @@ -11,6 +11,7 @@ }, "dependencies": { "@crownframework/svelte-error-boundary": "^1.0.3", + "image-capture": "^0.4.0", "svelte": "^3.49.0" }, "devDependencies": { diff --git a/src/Component.svelte b/src/Component.svelte index 522d955..1884f39 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -2,6 +2,7 @@ import { getContext, onDestroy } from "svelte"; import Captures from "./Captures.svelte"; import Loading from "./Loading.svelte"; + import { ImageCapture } from "image-capture"; export let field; export let label; diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000..5669f71 --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1 @@ +declare module "image-capture"; diff --git a/yarn.lock b/yarn.lock index 08992e2..d72f3f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -665,6 +665,11 @@ icss-utils@^5.0.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +image-capture@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/image-capture/-/image-capture-0.4.0.tgz#67b96608d0b58ecb1337ee335e4492733f6c11ee" + integrity sha512-6RWTfqC4ij0AldG+6sQ51XSHTSbwfqMSjVl1GtwNBzbW4UrcfGZeB1Kn749BccvtLb04g5+jSTf1D7q3qHcxpA== + import-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" From 349d50db29eb2fe624f517e4c6d40038ad5baaca Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 11:02:09 +0530 Subject: [PATCH 07/11] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index a576c72..5fedeca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ # Budibase Camera (beta) -[![Release](https://github.com/Netix-AI-RnD/budibase-component-camera/actions/workflows/release.yml/badge.svg)](https://github.com/Netix-AI-RnD/budibase-component-camera/actions/workflows/release.yml) - ![budibase camera demo](https://user-images.githubusercontent.com/110921612/209187286-58d8ae54-1275-4ed6-b7de-6cedf15a80ec.gif) From db9cce2f1b9f1bb961b8ebb0b896b2b82538498c Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 11:02:32 +0530 Subject: [PATCH 08/11] Update Component.svelte --- src/Component.svelte | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Component.svelte b/src/Component.svelte index 1884f39..922cc6c 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -62,10 +62,6 @@ imageCapture = new ImageCapture(track); videoSource.srcObject = stream; - // Fix for iOS Safari from https://leemartin.dev/hello-webrtc-on-safari-11-e8bcb5335295 - videoSource.setAttribute("autoplay", ""); - videoSource.setAttribute("muted", ""); - videoSource.setAttribute("playsinline", ""); videoSource.play(); videoSource = videoSource; From 54d441e081fc718b86b5c42afd0254386f1c32fd Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 11:02:50 +0530 Subject: [PATCH 09/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5fedeca..54718a5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Budibase Camera (beta) + ![budibase camera demo](https://user-images.githubusercontent.com/110921612/209187286-58d8ae54-1275-4ed6-b7de-6cedf15a80ec.gif) From 09682d78194da35225b89889b70a5744dbc8f496 Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 11:04:05 +0530 Subject: [PATCH 10/11] Update README.md --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 54718a5..ee45a2e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Budibase Camera (beta) +# Budibase Camera ![budibase camera demo](https://user-images.githubusercontent.com/110921612/209187286-58d8ae54-1275-4ed6-b7de-6cedf15a80ec.gif) @@ -7,13 +7,8 @@ Take pictures in Budibase! This component allows you to snap a photo directly into an Attachment field in a Budibase DB data source. It's a form field component and it saves the captured image files directly to the attachment column you configure. -## Known issues - -- doesn't currently work in Safari or Firefox. Chromium browsers only supported for now. - ## Todos - add camera selection - add more options (timer, resolution, format, etc.) -- allow photo deletion from field -- wider browser support +- allow photo deletion from the field From bf5c79a6e31b427e3f152e351db12c8f4b91d658 Mon Sep 17 00:00:00 2001 From: Ashish Kapoor Date: Tue, 25 Jul 2023 13:19:24 +0530 Subject: [PATCH 11/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee45a2e..29526b1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Budibase Camera +# Budibase Camera (beta) ![budibase camera demo](https://user-images.githubusercontent.com/110921612/209187286-58d8ae54-1275-4ed6-b7de-6cedf15a80ec.gif)