tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.61k stars 2.44k forks source link

navigator.mediaDevices is undefined #5370

Open MrChaker opened 1 year ago

MrChaker commented 1 year ago

Describe the bug

I want to access camera / other media devices , but navigator.mediaDevices is no longer working on build ( I said no longer because it used to work normally in the past )

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment › OS: Ubuntu 22.04 X64 › Node.js: 16.17.1 › npm: 8.19.1 › pnpm: Not installed! › yarn: 1.22.19 › rustup: 1.25.1 › rustc: 1.63.0 › cargo: 1.63.0 › Rust toolchain: stable-x86_64-unknown-linux-gnu

Packages › @tauri-apps/cli [NPM]: 1.1.1 › @tauri-apps/api [NPM]: 1.1.0 › tauri [RUST]: 1.1.1, › tauri-build [RUST]: 1.1.1, › tao [RUST]: 0.14.0, › wry [RUST]: 0.21.1,

App › build-type: bundle › CSP: unset › distDir: ../dist › devPath: http://localhost:3000/ › framework: React

Stack trace

No response

Additional context

No response

FabianLars commented 1 year ago

Please include the full output of tauri info Thanks

Elandig commented 1 year ago

Probably related to https://github.com/tauri-apps/wry/issues/85 https://github.com/tauri-apps/wry/issues/85#issuecomment-1246604440