-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getDisplayMedia returning undefined in macos. #2338
Comments
Please follow the issue template and provide all information. |
May we know your os? I suspect macos so i’ll give a quick hint; add this in your Cargo.toml under dependencies;
add this is to the top of your main.rs
Then create a sample plist in the root of
Then all should works as supposed For release build you need a custom plist. |
Thanks @lemarier. Will check it.! |
We need to document this or maybe help users define their plist file. |
ref; #1570 |
I wrote an Electron App that captures video from a USB capture card. I am currently in the process of porting it to Tauri. But still having issues and getting the grasp of when to use rust and js. I am a full JS dev. I based the idea off Firship's 10 minute electron project on youtube. You can use the example from there. |
This does not work for me and it throws the following error: --> src/main.rs:159:14
|
159 | .run(tauri::generate_context!())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::embed_info_plist_bytes` which comes from the expansion of the macro `tauri::generate_context` (in Nightly builds, run with -Z macro-backtrace for more info) any solutions? |
So it seems that after creating an <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<false/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist> tauri.conf.json "tauri": {
"bundle": {
"macOS": {
"entitlements": "Release.entitlements",
}
} and when trying to use something like: await navigator.mediaDevices.getDisplayMedia({
audio: false,
video: true
})
.then(stream => console.log(stream))
.catch(e => console.log(e)); on webkit returns: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. and on the server:
as such, there is no way to capture the screen. |
Remove below 3 lines from
|
I've trying to get the screen recording of my system through the tauri, but When I navigator doesn't even have the MediaDevices object.
Can anyone please help me to get the screen in macos?
Any ideas to implement feature like 'desktopCapturer' in electron?
The text was updated successfully, but these errors were encountered: