feat(screenshare): support remote wireless screensharing (#3809)

* feat(screenshare): support remote wireless screensharing

- Pass events to the ProxyConnectionService so it can
  handle establishing a peer connection so a remote
  participant, not in the conference, can send a
  video stream to the local participant to use as a
  local desktop stream.
- Modify the existing start screensharing flow to accept
  a desktop stream instead of always trying to create one.

* adjust ProxyConnectionService for lib review changes
This commit is contained in:
virtuacoplenny
2019-01-26 12:53:11 -08:00
committed by GitHub
parent 8e58ce7500
commit 6241172af8
3 changed files with 156 additions and 36 deletions
+20
View File
@@ -46,6 +46,7 @@ const events = {
'outgoing-message': 'outgoingMessage',
'participant-joined': 'participantJoined',
'participant-left': 'participantLeft',
'proxy-connection-event': 'proxyConnectionEvent',
'video-ready-to-close': 'readyToClose',
'video-conference-joined': 'videoConferenceJoined',
'video-conference-left': 'videoConferenceLeft',
@@ -743,6 +744,25 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
eventList.forEach(event => this.removeEventListener(event));
}
/**
* Passes an event along to the local conference participant to establish
* or update a direct peer connection. This is currently used for developing
* wireless screensharing with room integration and it is advised against to
* use as its api may change.
*
* @param {Object} event - An object with information to pass along.
* @param {Object} event.data - The payload of the event.
* @param {string} event.from - The jid of the sender of the event. Needed
* when a reply is to be sent regarding the event.
* @returns {void}
*/
sendProxyConnectionEvent(event) {
this._transport.sendEvent({
data: [ event ],
name: 'proxy-connection-event'
});
}
/**
* Returns the configuration for electron for the windows that are open
* from Jitsi Meet.