File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,7 +340,15 @@ PipeWireManager::PipeWireManager() {
340340 Q_EMIT error_occured (QStringLiteral (" Failed connecting to PipeWire audio service." ));
341341 return ;
342342 }
343- context = pw_context_new (pw_thread_loop_get_loop (thread_loop), nullptr , 0 );
343+
344+ pw_properties *props = pw_properties_new (nullptr , nullptr );
345+ pw_properties_set (props, PW_KEY_MEDIA_TYPE , " Audio" );
346+ pw_properties_set (props, PW_KEY_MEDIA_ROLE , " Music" );
347+
348+ // Required for Flatpak, otherwise it cannot write PipeWire metadata! Also nice to have for native packaging
349+ pw_properties_set (props, PW_KEY_MEDIA_CATEGORY , " Manager" );
350+
351+ context = pw_context_new (pw_thread_loop_get_loop (thread_loop), props, 0 );
344352 if (!context) {
345353 pw_thread_loop_unlock (thread_loop);
346354 qWarning (" Failed to create PipeWire context" );
You can’t perform that action at this time.
0 commit comments