tauri
tauri copied to clipboard
[bug] getUserMedia call slows application down to a halt
Describe the bug
Calling navigator.mediaDevices.getUserMedia from JS causes performance to drop considerably.
I get this warning from stdout
2022-12-17 18:02:57.497 Whiskey[5575:42511] IMKClient Stall detected, please Report your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_bundleIdentifierWithReply:) block performed very slowly (1.39 secs).
Reproduction
git clone https://github.com/bits-by-brandon/tauri-getusermedia-bug.gitcd tauri-getusermedia-bugyarn run tauri dev- observe drop in performance
Expected behavior
No response
Platform and versions
Environment › OS: Mac OS 13.1.0 X64 › Node.js: 16.16.0 › npm: 8.11.0 › pnpm: Not installed! › yarn: 1.22.19 › rustup: 1.25.1 › rustc: 1.65.0 › cargo: 1.65.0 › Rust toolchain: stable-x86_64-apple-darwin
Stack trace
2022-12-17 18:02:57.497 Whiskey[5575:42511] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_bundleIdentifierWithReply:) block performed very slowly (1.39 secs).
Additional context
No response
My issues is Webrtc video behavior is different from safari behavior. Tauri-mobile can not be autoplay from the camera mediastream. The permission description has been added to the Info.plist file.
<key>NSCameraUsageDescription</key>
<string>Request camera access for WebRTC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request microphone access for WebRTC</string>
Test URL media-recorder-api-demo tauri.conf.json
{
"build": {
"beforeDevCommand": "",
"beforeBuildCommand": "",
"devPath": "https://addpipe.com/media-recorder-api-demo/",
"distDir": "../dist",
"withGlobalTauri": false
},
}
device
iphone 8 plus
version: 15.5
Similar issue for me.
IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_windowLevelWithReply:) block performed very slowly (3.30 secs).