fix(native): split application & tappable application (#10491)

A listening tappable app's info should inherit from its group process's name/icon. However the group process may not be listed as a tappable application.
This commit is contained in:
pengx17
2025-02-27 15:02:38 +00:00
parent c50184bee6
commit 9e0cae58d7
22 changed files with 975 additions and 313 deletions
+19 -6
View File
@@ -1,14 +1,12 @@
/* auto-generated by NAPI-RS */
/* eslint-disable */
export declare class Application {
static tapGlobalAudio(excludedProcesses: Array<Application> | undefined | null, audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream
constructor(processId: number)
get processId(): number
get processGroupId(): number
get bundleIdentifier(): string
get name(): string
get icon(): Buffer
get isRunning(): boolean
tapAudio(audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream
}
export declare class ApplicationListChangedSubscriber {
@@ -73,11 +71,13 @@ export declare class RecordingPermissions {
export declare class ShareableContent {
static onApplicationListChanged(callback: ((err: Error | null, ) => void)): ApplicationListChangedSubscriber
static onAppStateChanged(app: Application, callback: ((err: Error | null, ) => void)): ApplicationStateChangedSubscriber
static onAppStateChanged(app: TappableApplication, callback: ((err: Error | null, ) => void)): ApplicationStateChangedSubscriber
constructor()
applications(): Array<Application>
applicationWithProcessId(processId: number): Application
applications(): Array<TappableApplication>
applicationWithProcessId(processId: number): Application | null
tappableApplicationWithProcessId(processId: number): TappableApplication | null
checkRecordingPermissions(): RecordingPermissions
static tapGlobalAudio(excludedProcesses: Array<TappableApplication> | undefined | null, audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream
}
export declare class SqliteConnection {
@@ -118,6 +118,19 @@ export declare class SqliteConnection {
checkpoint(): Promise<void>
}
export declare class TappableApplication {
constructor(objectId: AudioObjectID)
static fromApplication(app: Application, objectId: AudioObjectID): TappableApplication
get processId(): number
get processGroupId(): number
get bundleIdentifier(): string
get name(): string
get objectId(): number
get icon(): Buffer
get isRunning(): boolean
tapAudio(audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream
}
/**Enumeration of valid values for `set_brate` */
export declare enum Bitrate {
/**8_000 */