2018-04-26 15:33:47 +02:00
import { VideoInsertMode } from '../../Enums/VideoInsertMode' ;
/ * *
* See [ [ OpenVidu . initPublisher ] ]
* /
export interface PublisherProperties {
/ * *
* Which device should provide the audio source . Can be :
* - Property ` deviceId ` of a [ [ Device ] ]
* - A MediaStreamTrack obtained from a MediaStream object with [ [ OpenVidu . getUserMedia ] ]
* - ` false ` or null to have a video - only publisher
* @default _Default microphone_
* /
audioSource? : string | MediaStreamTrack | boolean ;
/ * *
* Desired framerate of the video in frames per second
* /
frameRate? : number ;
/ * *
* How the video element of the publisher should be inserted in the DOM
* @default VideoInsertMode . APPEND
* /
2018-04-27 11:08:03 +02:00
insertMode? : VideoInsertMode | string ;
2018-04-26 15:33:47 +02:00
/ * *
* Whether the publisher ' s video will be mirrored in the page or not . Only affects the local view of the publisher in the browser ( remote streams will not be mirrored ) . If ` videoSource ` is set to "screen" this property is fixed to ` false `
* @default true
* /
mirror? : boolean ;
/ * *
* Whether to initially publish to the session with the audio unmuted or muted . Only makes sense if property ` audioSource ` is NOT set to false . You can change the audio state later during the session with [ [ Publisher . publishAudio ] ]
* @default true
* /
publishAudio? : boolean ;
/ * *
* Whether to initially publish to the session with the video enabled or disabled . Only makes sense if property ` videoSource ` is NOT set to false . You can change the video state later during the session with [ [ Publisher . publishVideo ] ]
* @default true
* /
publishVideo? : boolean ;
/ * *
* Resolution of the video : ` "320x240" ` , ` "640x480" ` , ` "1280x720" ` ( low , medium and high quality respectively )
* @default "640x480"
* /
resolution? : string ;
/ * *
* Which device should provide the video source . Can be :
* - Property ` deviceId ` of a [ [ Device ] ]
* - ` "screen" ` to screen - share . We provide a default screen - shraring extension for Chrome that can run in any domain , but you can customize it so it has your own icon , your own name , etc . Visit this
* [ GitHub repository ] ( https : //github.com/OpenVidu/openvidu-screen-sharing-chrome-extension/) to learn how. Once you have uploaded your own extension to Chrome Web Store,
* simply call ` OpenVidu.setAdvancedConfiguration({screenShareChromeExtension : "https://chrome.google.com/webstore/detail/YOUR_EXTENSION_NAME/YOUR_EXTENSION_ID"}) ` before calling ` OpenVidu.initPublisher(targetElement, {videoSource: "screen"}) ` .
* - A MediaStreamTrack obtained from a MediaStream object with [ [ OpenVidu . getUserMedia ] ]
* - ` false ` or null to have an audio - only publisher
* @default _Default camera_
* /
videoSource? : string | MediaStreamTrack | boolean ;
}