diff --git a/.changes/fix-desktop-recording.md b/.changes/fix-desktop-recording.md new file mode 100644 index 0000000..fa2b96f --- /dev/null +++ b/.changes/fix-desktop-recording.md @@ -0,0 +1,9 @@ +--- +"tauri-plugin-camera-kessdev": "patch" +"tauri-plugin-camera-kessdev-js": "patch" +--- + +Fix desktop video recording: keep the preview stream alive (reuse its video +track instead of stopping it), pick an explicit supported recording mime type +instead of falling back to WebM, and omit `bytesRecorded`/`bitrate` telemetry +until a real chunk arrives. diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index e25f62a..0894afe 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -48,7 +48,29 @@ jobs: with: command: 'version-or-publish' token: ${{ secrets.GITHUB_TOKEN }} - createRelease: true + # Disabled: the covector action crashes while serializing the injected + # createReleases generator function to YAML ("Tag not resolved for + # GeneratorFunction value"). Releases are created in the step below. + createRelease: 'false' + + - name: create GitHub releases + if: steps.covector.outputs.commandRan == 'publish' && steps.covector.outputs.successfulPublish == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -e + RUST_VERSION="$(grep -m1 '^version' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')" + JS_VERSION="$(node -p "require('./package.json').version")" + SHA="$(git rev-parse HEAD)" + for entry in "tauri-plugin-camera-kessdev:${RUST_VERSION}" "tauri-plugin-camera-kessdev-js:${JS_VERSION}"; do + pkg="${entry%%:*}"; version="${entry##*:}" + tag="${pkg}-v${version}" + if gh release view "$tag" >/dev/null 2>&1; then + echo "release $tag already exists" + else + gh release create "$tag" --title "$pkg v$version" --target "$SHA" --notes "Automated release for $pkg v$version" || echo "failed to create release $tag" + fi + done - name: create pull request if: steps.covector.outputs.commandRan == 'version' diff --git a/README.md b/README.md index ba78491..75293cd 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,11 @@ const withThumbnail = await stopRecording({ thumbnail: true }) await startRecording({ quality: 'fhd', fps: 30, bitrate: 2_000_000 }) // quality: 'sd' | 'hd' | 'fhd' | 'uhd' ``` +On desktop the preview stays alive during recording: the recording reuses the +preview's video track (only the microphone is acquired separately), so the +`