Skip to content

Commit

Permalink
feat(screenshare) Allow desktop sharing in audioOnly mode on web.
Browse files Browse the repository at this point in the history
This is already supported on mobile. The user is allowed to enable their video in audioOnly mode so it doesn't make sense to block screenshare.
  • Loading branch information
c0m1t authored Feb 28, 2022
1 parent 06800f8 commit f62dc44
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -1661,9 +1661,12 @@ export default {
* toggles between screen sharing and camera video.
* @param {Object} [options] - Screen sharing options that will be passed to
* createLocalTracks.
* @param {boolean} [options.audioOnly] - Whether or not audioOnly is enabled.
* @param {Array<string>} [options.desktopSharingSources] - Array with the
* sources that have to be displayed in the desktop picker window ('screen',
* 'window', etc.).
* @param {Object} [options.desktopStream] - An existing desktop stream to
* use instead of creating a new desktop stream.
* @param {boolean} ignoreDidHaveVideo - if true ignore if video was on when sharing started.
* @return {Promise.<T>}
*/
Expand All @@ -1676,10 +1679,6 @@ export default {
return Promise.reject('Cannot toggle screen sharing: not supported.');
}

if (this.isAudioOnly()) {
return Promise.reject('No screensharing in audio only mode');
}

if (toggle) {
try {
await this._switchToScreenSharing(options);
Expand Down

0 comments on commit f62dc44

Please sign in to comment.