mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
updated readme and made sure there is an exact application title match
This commit is contained in:
parent
65089494a8
commit
49d2e997bf
2 changed files with 14 additions and 19 deletions
|
@ -1,22 +1,16 @@
|
||||||
# Hifi-Screenshare
|
# Screen Sharing within High Fidelity
|
||||||
|
This Screen Share app, built using Electron, allows for easy desktop screen sharing when used in conjuction with various scripts in the `hifi-content` repository.
|
||||||
|
|
||||||
The Screenshare app will allow easy desktop sharing by being launced from within the highfidelity interface.
|
# Screen Sharing Source Files
|
||||||
|
## `packager.js`
|
||||||
|
Calling npm run packager will use this file to create the actual Electron `hifi-screenshare` executable.
|
||||||
|
It will kick out a folder `hifi-screenshare-<platform>` which contains an executable.
|
||||||
|
|
||||||
# Setup
|
## `src/screenshareApp.js`
|
||||||
Create the following environment variable the hifi-screenshare app will use to get the proper connection info:
|
The main process file to configure the electron app.
|
||||||
hifiScreenshareURL="<URL for authentication>"
|
|
||||||
|
|
||||||
# Screenshare API
|
## `src/screenshareMainProcess.js`
|
||||||
In order to launch the hifi-screenshare app from within interface, you will call the following:
|
The render file to display the app's UI.
|
||||||
Screenshare.startScreenshare(displayName, userName, token, sessionID, apiKey);
|
|
||||||
The app won't run without the correct info.
|
|
||||||
|
|
||||||
# Files included
|
## `screenshareApp.html`
|
||||||
packager.js :
|
The HTML that displays the screen selection UI and the confirmation screen UI.
|
||||||
Calling npm run packager will use this file to create the actual electron hifi-screenshare executable
|
|
||||||
|
|
||||||
src/main.js :
|
|
||||||
The main process file to configure the electron app
|
|
||||||
|
|
||||||
srce/app.js :
|
|
||||||
The render file to dispaly the screenshare UI
|
|
|
@ -140,6 +140,7 @@ function addSources(){
|
||||||
// 5. Add thse sources
|
// 5. Add thse sources
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const SCREENSHARE_TITLE = "Screen share";
|
const SCREENSHARE_TITLE = "Screen share";
|
||||||
|
const SCREENSHARE_TITLE_REGEX = new RegExp("^" + SCREENSHARE_TITLE + "$");
|
||||||
const IMAGE_WIDTH = 265;
|
const IMAGE_WIDTH = 265;
|
||||||
const IMAGE_HEIGHT = 165;
|
const IMAGE_HEIGHT = 165;
|
||||||
let screenshareSourceArray = [];
|
let screenshareSourceArray = [];
|
||||||
|
@ -158,7 +159,7 @@ function showSources() {
|
||||||
console.log("Error getting sources", error);
|
console.log("Error getting sources", error);
|
||||||
}
|
}
|
||||||
for (let source of sources) {
|
for (let source of sources) {
|
||||||
if (source.name.indexOf(SCREENSHARE_TITLE) > -1){
|
if (source.name.match(SCREENSHARE_TITLE_REGEX)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sourceMap[source.id] = source;
|
sourceMap[source.id] = source;
|
||||||
|
|
Loading…
Reference in a new issue