Posts

Post not yet marked as solved
0 Replies
175 Views
I want to detect Settings Scene's on disappear/close event. But when I watch scenePhase of Settings, nothing is printed. @main struct MyApp: App { @Environment(\.scenePhase) private var scenePhase var body: some Scene { WindowGroup { ContentView() } #if os(macOS) Settings { SettingsView() } .onChange(of: scenePhase) { newValue in print(newValue) } #endif } } Also ask on stackoverflow
Posted Last updated
.
Post not yet marked as solved
1 Replies
398 Views
I would like to call navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(() => {...}); in my background.js. But It will neither resolve nor reject. I try to run it in console of background.js, but only get Promise {status: "pending"} = $1
Posted Last updated
.