feat(screenshare) Allow desktop sharing in audioOnly mode on web.
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.
This commit is contained in:
parent
06800f88bf
commit
f62dc44f3e
|
@ -1661,9 +1661,12 @@ export default {
|
||||||
* toggles between screen sharing and camera video.
|
* toggles between screen sharing and camera video.
|
||||||
* @param {Object} [options] - Screen sharing options that will be passed to
|
* @param {Object} [options] - Screen sharing options that will be passed to
|
||||||
* createLocalTracks.
|
* createLocalTracks.
|
||||||
|
* @param {boolean} [options.audioOnly] - Whether or not audioOnly is enabled.
|
||||||
* @param {Array<string>} [options.desktopSharingSources] - Array with the
|
* @param {Array<string>} [options.desktopSharingSources] - Array with the
|
||||||
* sources that have to be displayed in the desktop picker window ('screen',
|
* sources that have to be displayed in the desktop picker window ('screen',
|
||||||
* 'window', etc.).
|
* '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.
|
* @param {boolean} ignoreDidHaveVideo - if true ignore if video was on when sharing started.
|
||||||
* @return {Promise.<T>}
|
* @return {Promise.<T>}
|
||||||
*/
|
*/
|
||||||
|
@ -1676,10 +1679,6 @@ export default {
|
||||||
return Promise.reject('Cannot toggle screen sharing: not supported.');
|
return Promise.reject('Cannot toggle screen sharing: not supported.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isAudioOnly()) {
|
|
||||||
return Promise.reject('No screensharing in audio only mode');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
try {
|
try {
|
||||||
await this._switchToScreenSharing(options);
|
await this._switchToScreenSharing(options);
|
||||||
|
|
Loading…
Reference in New Issue