diff --git a/src/Goggles.ts b/src/Goggles.ts index acbb12d..a225f21 100644 --- a/src/Goggles.ts +++ b/src/Goggles.ts @@ -32,9 +32,12 @@ export default class Goggles { await this.device.claimInterface(3); } + async close() { + this.device.close(); + } + async requestVideo() { - const writeResult = await this.sendRawData(new Uint8Array([0x52, 0x4d, 0x56, 0x54])); - return writeResult.status === 'ok'; + this.sendRawData(new Uint8Array([0x52, 0x4d, 0x56, 0x54])); } async startPolling() { @@ -43,7 +46,6 @@ export default class Goggles { if (this.device.opened) { const result = await this.device.transferIn(ENDPOINT_IN, BUFFER_LENGTH); if (this.onDataCallback !== null && result.data) { - console.log(result); this.onDataCallback(result.data); } } diff --git a/src/ui/index.html b/src/ui/index.html index 0e37331..ec2f26d 100644 --- a/src/ui/index.html +++ b/src/ui/index.html @@ -7,6 +7,7 @@
Waiting to recieve video...