tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Can't close MediaStream (Camera Indicator stll active)

Open xxidbr9 opened this issue 2 years ago • 2 comments

Describe the bug

The camera Indicator is still active even camera stream is stop(),

Example Here is a simple example for reproducing the bug I found, Repo Link: https://github.com/xxidbr9/camera-issue-tauri

I have mac and windows device and all of the device is facing the same issue, the problem is only when I run it on Tauri, but I have no problem when running it as a normal Web app

Reproduction

  1. Clone the repo
  2. and try web and Tauri version to compare

Expected behavior

Will turn off camera indicator when use

// const stream = navigator.mediaDevices.getUserMedia({ video: true, audio: true })
stream.getTracks().forEach(track => track.stop());

Platform and versions

› OS: Mac OS 13.2.1 X64
  › Node.js: 16.19.0
  › npm: 8.19.3
  › pnpm: 8.1.0
  › yarn: 1.22.19
  › rustup: 1.25.1
  › rustc: 1.66.1
  › cargo: 1.66.1
  › Rust toolchain: stable-aarch64-apple-darwin

Stack trace

No response

Additional context

No response

xxidbr9 avatar Apr 03 '23 21:04 xxidbr9

i am not able to see any mediadevices under navigator running tauri app in ubuntu22.04. so unable to open usb camera using tauri app.

learncodingforweb avatar Jun 10 '23 18:06 learncodingforweb

@learncodingforweb webrtc is not available in webkitgtk yet: https://github.com/tauri-apps/tauri/issues/5370 / https://github.com/tauri-apps/wry/issues/85 and therefore your issue is unrelated to this one :)

FabianLars avatar Jun 11 '23 17:06 FabianLars