From 0af649d1b8388738f1964ba7ac34ac33c13dfe33 Mon Sep 17 00:00:00 2001 From: Shane Harris Date: Wed, 11 Nov 2020 13:54:12 +0000 Subject: [PATCH] removed scrcpy, added httpreferrer --- desktop-app/src/app/app.component.html | 2 +- desktop-app/src/app/app.component.ts | 2 +- desktop-app/src/app/app.service.ts | 78 ++++++------- .../src/app/header/header.component.html | 108 +----------------- .../src/app/header/header.component.ts | 22 ---- package.json | 2 +- 6 files changed, 45 insertions(+), 169 deletions(-) diff --git a/desktop-app/src/app/app.component.html b/desktop-app/src/app/app.component.html index 73ab010..fc1899e 100644 --- a/desktop-app/src/app/app.component.html +++ b/desktop-app/src/app/app.component.html @@ -5,7 +5,7 @@ - + diff --git a/desktop-app/src/app/app.component.ts b/desktop-app/src/app/app.component.ts index 87ab539..db31a26 100644 --- a/desktop-app/src/app/app.component.ts +++ b/desktop-app/src/app/app.component.ts @@ -32,7 +32,7 @@ export class AppComponent implements OnInit, AfterViewInit { ngOnInit() { this.adbService .setupAdb() - .then(() => this.appService.downloadScrCpyBinary(this.adbService)) + // .then(() => this.appService.downloadScrCpyBinary(this.adbService)) .then(() => this.adbService.connectedStatus()) .then(() => { if (!localStorage.getItem('first_run')) { diff --git a/desktop-app/src/app/app.service.ts b/desktop-app/src/app/app.service.ts index b5cc9dd..2b436b0 100644 --- a/desktop-app/src/app/app.service.ts +++ b/desktop-app/src/app/app.service.ts @@ -363,45 +363,45 @@ export class AppService { } } - downloadScrCpyBinary(adbClientService) { - if (this.os.platform() === 'win32') { - this.spinnerService.showLoader(); - let task = { status: 'Downloading/Extracting ScrCpy...' }; - this.spinnerService.setMessage('', task); - let url = 'https://github.com/Genymobile/scrcpy/releases/download/v1.11/scrcpy-win64-v1.11.zip'; - let downloadPath = this.path.join(this.appData, 'scrcpy', 'scrcpy.exe'); - if (this.doesFileExist(downloadPath)) { - this.scrcpyBinaryPath = downloadPath; - this.spinnerService.hideLoader(); - return Promise.resolve(); - } - return new Promise((resolve, reject) => { - this.downloadFile( - url, - url, - url, - () => { - return this.path.join(this.appData, 'scrcpy.zip'); - }, - task - ).then((path: any) => { - let callback = error => { - if (error) return reject(error); - this.fs.unlink(path, err => { - // if(err) return reject(err); - this.spinnerService.hideLoader(); - resolve(path.split('.')[0]); - }); - }; - - this.extract(path, { dir: this.path.join(this.appData, 'scrcpy') }, callback); - this.scrcpyBinaryPath = downloadPath; - }); - }); - } else { - this.scrcpyBinaryPath = 'ADB=' + adbClientService.adbPath + ' scrcpy'; - } - } + // downloadScrCpyBinary(adbClientService) { + // if (this.os.platform() === 'win32') { + // this.spinnerService.showLoader(); + // let task = { status: 'Downloading/Extracting ScrCpy...' }; + // this.spinnerService.setMessage('', task); + // let url = 'https://github.com/Genymobile/scrcpy/releases/download/v1.11/scrcpy-win64-v1.11.zip'; + // let downloadPath = this.path.join(this.appData, 'scrcpy', 'scrcpy.exe'); + // if (this.doesFileExist(downloadPath)) { + // this.scrcpyBinaryPath = downloadPath; + // this.spinnerService.hideLoader(); + // return Promise.resolve(); + // } + // return new Promise((resolve, reject) => { + // this.downloadFile( + // url, + // url, + // url, + // () => { + // return this.path.join(this.appData, 'scrcpy.zip'); + // }, + // task + // ).then((path: any) => { + // let callback = error => { + // if (error) return reject(error); + // this.fs.unlink(path, err => { + // // if(err) return reject(err); + // this.spinnerService.hideLoader(); + // resolve(path.split('.')[0]); + // }); + // }; + // + // this.extract(path, { dir: this.path.join(this.appData, 'scrcpy') }, callback); + // this.scrcpyBinaryPath = downloadPath; + // }); + // }); + // } else { + // this.scrcpyBinaryPath = 'ADB=' + adbClientService.adbPath + ' scrcpy'; + // } + // } deleteFolderRecursive(path) { if (this.fs.existsSync(path)) { this.fs.readdirSync(path).forEach(file => { diff --git a/desktop-app/src/app/header/header.component.html b/desktop-app/src/app/header/header.component.html index 9a36506..03d454f 100644 --- a/desktop-app/src/app/header/header.component.html +++ b/desktop-app/src/app/header/header.component.html @@ -484,115 +484,13 @@ -

Stream Options

+

Oculus Casting

-
-
- Always On Top -
- Make scrcpy window always on top (above other windows). -
-
-
-
- -
-
-
- Bit Rate -
- Encode the video at the given bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M' - (x1000000). -
-
-
- - -
-
- 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. -
-
-
- - -
Quest 1 Crop
-
Quest 2 Crop
-
-
- Fullscreen -
- Start in fullscreen. -
-
-
-
- -
-
-
- No Input -
- Disable device control (mirror the device in read-only). -
-
-
-
- -
-
-
- Max FPS -
- Limit the frame rate of screen capture. 0 is unlimited. -
-
-
- - -
-
- Max Size -
- Limit both the width and height of the video to value. The other dimension is computed so that the device - aspect-ratio is preserved. 0 is unlimited. -
-
-
- - -
-
- To use ScrCpy on mac you will need to install Homebrew and then install scrcpy with brew install scrcpy -

-
-
- To use ScrCpy on Linux you will need to install snap package manager with sudo snap install scrcpy -
-
+ In the past we used a tool called ScrCpy or Screen Copy to stream from your headset to your PC. Oculus have since released casting to a browser page that provides a much more stable experience including support for audio. We have since removed the option to stream with ScrCpy in favour of the native option that works better.
-

Put your headset on before clicking Start Stream
- +
diff --git a/desktop-app/src/app/header/header.component.ts b/desktop-app/src/app/header/header.component.ts index de3e178..b99414e 100644 --- a/desktop-app/src/app/header/header.component.ts +++ b/desktop-app/src/app/header/header.component.ts @@ -61,15 +61,6 @@ export class HeaderComponent implements OnInit { favoritePathType = 'Path'; favouriteImportExport: boolean; favouriteMax: number; - scrcpy_options: any = { - always_on_top: false, - bit_rate: '8000000', - crop: '1280:720:1500:350', - no_control: true, - fullscreen: false, - max_size: '0', - max_fps: '0', - }; // BAG = 'FAVS'; subs = new Subscription(); logcatTag: string = ''; @@ -171,13 +162,7 @@ export class HeaderComponent implements OnInit { } updateAvailable() { - // if (process.platform == 'win32') { - // this.spinnerService.setMessage('Downloading update...'); - // this.spinnerService.showLoader(); - // this.appService.electron.ipcRenderer.send('automatic-update', {}); - // } else { this.appService.opn('https://sidequestvr.com/download'); - // } } startLogcat() { @@ -251,13 +236,6 @@ export class HeaderComponent implements OnInit { this.adbService.adbCommand('endLogcat'); } - runscrcpy() { - this.appService - .runScrCpy(this.scrcpy_options) - .then(() => this.statusService.showStatus('Stream closed.')) - .catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true)); - } - gogo(e) { if (e.keyCode === 13) { this.webService.loadUrl(this.webService.currentAddress); diff --git a/package.json b/package.json index 7ecdd32..a5a263e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "SideQuest", "productName": "SideQuest", - "version": "0.10.18", + "version": "0.10.19", "description": "A open app store for mobile android based VR devices such as the Levovo Mirage, Oculus Go, Oculus Quest, Vive Focus.", "repository": "https://github.com/SideQuestVR/SideQuest.git", "license": "UNLICENCED",