mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: document audioSource to "screen". Warn when no videoSource to "screen"
parent
ad96776571
commit
d2423b012d
|
@ -1024,6 +1024,10 @@ export class OpenVidu {
|
||||||
if (typeof videoSource === 'string') {
|
if (typeof videoSource === 'string') {
|
||||||
if (!this.isScreenShare(videoSource)) {
|
if (!this.isScreenShare(videoSource)) {
|
||||||
this.setVideoSource(myConstraints, 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 {
|
} else {
|
||||||
// Screen sharing
|
// Screen sharing
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ export interface PublisherProperties {
|
||||||
/**
|
/**
|
||||||
* Which device should provide the audio source. Can be:
|
* Which device should provide the audio source. Can be:
|
||||||
* - Property `deviceId` of a {@link Device}
|
* - 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}
|
* - A MediaStreamTrack obtained from a MediaStream object with {@link OpenVidu.getUserMedia}
|
||||||
* - `false` or null to have a video-only publisher
|
* - `false` or null to have a video-only publisher
|
||||||
* @default _Default microphone_
|
* @default _Default microphone_
|
||||||
|
|
Loading…
Reference in New Issue