added device support for scrcpy

This commit is contained in:
Shane Harris
2021-05-13 09:44:01 +01:00
parent 653abc9156
commit b339b86a32
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -334,7 +334,9 @@ export class AppService {
(options.fullscreen ? '-f' : '') + (options.fullscreen ? '-f' : '') +
' ' + ' ' +
(options.no_control ? '-n' : '') + (options.no_control ? '-n' : '') +
' --window-title "SideQuest Stream"'; ' --window-title "SideQuest Stream"' +
' ' +
(options.device ? '-s ' + options.device : '');
console.log(command); console.log(command);
this.exec(command, function(err, stdout, stderr) { this.exec(command, function(err, stdout, stderr) {
if (err) { if (err) {
@@ -85,6 +85,7 @@ export class HeaderComponent implements OnInit {
fullscreen: false, fullscreen: false,
max_size: '0', max_size: '0',
max_fps: '0', max_fps: '0',
device: '',
}; };
currentLogCat: LogCatEntry[] = []; currentLogCat: LogCatEntry[] = [];
isStarted: boolean; isStarted: boolean;
@@ -148,6 +149,7 @@ export class HeaderComponent implements OnInit {
} }
} }
runscrcpy() { runscrcpy() {
this.scrcpy_options.device = this.adbService.deviceSerial;
this.appService this.appService
.runScrCpy(this.scrcpy_options) .runScrCpy(this.scrcpy_options)
.then(() => this.statusService.showStatus('Stream closed.')) .then(() => this.statusService.showStatus('Stream closed.'))