Skip to content

Commit

Permalink
Refactor TethrManager and update USB camera request
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Sep 17, 2024
1 parent c8c94b2 commit 1af8e10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/TethrManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export class TethrManager extends EventEmitter<TethrManagerEvents> {
async #requestUSBPTPCamera(): Promise<OperationResult<TethrPTPUSB>> {
let usbDevice: USBDevice
try {
usbDevice = await navigator.usb.requestDevice({filters: []})
usbDevice = await navigator.usb.requestDevice({
filters: [{classCode: 6}], // Still Image class
})
} catch (err) {
return {status: 'general error', message: 'Unable to connect to camera'}
}
Expand Down

0 comments on commit 1af8e10

Please sign in to comment.