Skip to content

Commit

Permalink
openvidu-browser: document audioSource to "screen". Warn when no vide…
Browse files Browse the repository at this point in the history
…oSource to "screen"
  • Loading branch information
pabloFuente committed Oct 5, 2023
1 parent ad96776 commit d2423b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openvidu-browser/src/OpenVidu/OpenVidu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down

0 comments on commit d2423b0

Please sign in to comment.