(device: DeviceInfo)
| 81 | } |
| 82 | |
| 83 | export function getProviderDeviceInteractor(device: DeviceInfo): Interactor | undefined { |
| 84 | for (const runtime of getActiveProviderDeviceRuntimes()) { |
| 85 | if (!runtime.ownsDevice(device)) continue; |
| 86 | const interactor = runtime.getInteractor(device); |
| 87 | if (interactor) return interactor; |
| 88 | } |
| 89 | return undefined; |
| 90 | } |
| 91 | |
| 92 | export function isActiveProviderDevice(device: DeviceInfo): boolean { |
| 93 | return getActiveProviderDeviceRuntimes().some((runtime) => runtime.ownsDevice(device)); |