Name Chrome streams after their browser tabs
A browser extension reports audible tabs to moonmix-tabs-host, which matches them to PipeWire streams by time and publishes the names for the mixer; streams of one tab share a row. Ambiguous streams keep the browser's name. Without the extension, a browser's only running stream shows its MPRIS title. The smoke test no longer claims real audio hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b61d504234
commit
e16cc1b2ad
31 files changed
+1830
-15
No files matched your search
@@ -68,6 +68,12 @@ extern "C" fn ffi_node_exists(id : Int32) -> Int32 = "mm_wp_node_exists"
|
||||
#borrow(key)
|
||||
extern "C" fn ffi_node_prop(id : Int32, key : Bytes) -> Bytes = "mm_wp_node_prop"
|
||||
|
||||
///|
|
||||
extern "C" fn ffi_node_running(id : Int32) -> Int32 = "mm_wp_node_running"
|
||||
|
||||
///|
|
||||
extern "C" fn ffi_parent_pid(pid : Int32) -> Int32 = "mm_wp_parent_pid"
|
||||
|
||||
///|
|
||||
extern "C" fn ffi_query_volume(id : Int32) -> Int32 = "mm_wp_query_volume"
|
||||
|
||||
@@ -204,6 +210,9 @@ pub fn read_node(id : Int32) -> @model.Node? {
|
||||
node_prop(id, "application.id")
|
||||
}
|
||||
}
|
||||
let pid = @string.parse_int(node_prop(id, "application.process.id")) catch {
|
||||
_ => 0
|
||||
}
|
||||
Some(
|
||||
@model.Node::new(
|
||||
id,
|
||||
@@ -217,6 +226,9 @@ pub fn read_node(id : Int32) -> @model.Node? {
|
||||
bus=node_prop(id, "device.bus"),
|
||||
app_binary=node_prop(id, "application.process.binary"),
|
||||
app_id~,
|
||||
serial=node_prop(id, "object.serial"),
|
||||
parent_pid=ffi_parent_pid(pid),
|
||||
running=ffi_node_running(id) != 0,
|
||||
volumes~,
|
||||
mute~,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user