openvidu-browser: document audioSource to "screen". Warn when no videoSource to "screen"

pull/820/head
pabloFuente 2023-10-05 16:54:56 +02:00
parent ad96776571
commit d2423b012d
2 changed files with 5 additions and 0 deletions

View File

@ -1024,6 +1024,10 @@ export class OpenVidu {
if (typeof videoSource === 'string') {
if (!this.isScreenShare(videoSource)) {
this.setVideoSource(myConstraints, videoSource);
if (audioSource === 'screen') {
logger.warn('Parameter "audioSource" is set to "screen", which means rquesting audio from screen sharing source. But "videoSource" is not set to "screen". No audio source will be requested');
myConstraints.constraints!.audio = false;
}
} else {
// Screen sharing

View File

@ -25,6 +25,7 @@ export interface PublisherProperties {
/**
* Which device should provide the audio source. Can be:
* - Property `deviceId` of a {@link Device}
* - `"screen"` to share the screen audio when {@link videoSource} is set to `"screen"`. If {@link videoSource} is not set to `"screen"` this will result in no audio source and a video-only publisher.
* - A MediaStreamTrack obtained from a MediaStream object with {@link OpenVidu.getUserMedia}
* - `false` or null to have a video-only publisher
* @default _Default microphone_