diff --git a/desktop-app/src/app/stream-options/stream-options.component.html b/desktop-app/src/app/stream-options/stream-options.component.html
index a93f382..9bb1211 100644
--- a/desktop-app/src/app/stream-options/stream-options.component.html
+++ b/desktop-app/src/app/stream-options/stream-options.component.html
@@ -3,6 +3,7 @@
Start Stream
Oculus Casting
+ Disable Proximity Sensor
@@ -37,14 +38,17 @@
Crop
Crop the device screen on the server. The values are expressed in the device natural orientation (typically,
- portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size.
+ portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size. The format is width:height:left:top.
Fullscreen
diff --git a/desktop-app/src/app/stream-options/stream-options.component.ts b/desktop-app/src/app/stream-options/stream-options.component.ts
index 11fbaad..40b6957 100644
--- a/desktop-app/src/app/stream-options/stream-options.component.ts
+++ b/desktop-app/src/app/stream-options/stream-options.component.ts
@@ -12,7 +12,7 @@ export class StreamOptionsComponent implements OnInit {
scrcpy_options: any = {
always_on_top: false,
bit_rate: '8000000',
- crop: '1280:720:1500:350',
+ crop: '1600:900:2017:510',
no_control: true,
fullscreen: false,
max_size: '0',
@@ -35,4 +35,15 @@ export class StreamOptionsComponent implements OnInit {
.then(() => this.statusService.showStatus('Stream closed.'))
.catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true));
}
+
+ disableProximity(shouldEnable) {
+ this.runAdbCommand('am broadcast -a com.oculus.vrpowermanager.' + (shouldEnable ? 'automation_disable' : 'prox_close'))
+ .then(() => {
+ this.statusService.showStatus((shouldEnable ? 'Enable' : 'Disable') + ' proximity message sent OK!!');
+ })
+ .catch(e => this.statusService.showStatus(e, true));
+ }
+ runAdbCommand(command: string) {
+ return this.adbService.adbCommand('shell', { command, serial: this.adbService.deviceSerial });
+ }
}