OpenVidu Browser - v2.32.2
    Preparing search index...

    Interface PublisherProperties

    interface PublisherProperties {
        audioSource?: string | boolean | MediaStreamTrack;
        filter?: Filter;
        frameRate?: number;
        insertMode?: string;
        mirror?: boolean;
        publishAudio?: boolean;
        publishVideo?: boolean;
        resolution?: string;
        videoSimulcast?: boolean;
        videoSource?: string | boolean | MediaStreamTrack;
    }
    Index

    Properties

    audioSource?: string | boolean | MediaStreamTrack

    Which device should provide the audio source. Can be:

    • Property deviceId of a Device
    • "screen" to share the screen audio when videoSource is set to "screen". If 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 OpenVidu.getUserMedia
    • false or null to have a video-only publisher
    _Default microphone_
    
    filter?: Filter

    WARNING: experimental option. This property may change in the near future

    Define a filter to apply in the Publisher's stream

    frameRate?: number

    Desired framerate of the video in frames per second. Limiting the framerate has always effect on browsers Chrome and Opera. Firefox requires that the input device explicitly supports the desired framerate.

    undefined
    
    insertMode?: string

    How the video element of the publisher should be inserted in the DOM

    VideoInsertMode.APPEND
    
    mirror?: boolean

    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

    true
    
    publishAudio?: 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 or null. You can change the audio state later during the session with Publisher.publishAudio

    true
    
    publishVideo?: 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 or null. You can change the video state later during the session with Publisher.publishVideo

    true
    
    resolution?: string

    Resolution of the video: "320x240", "640x480", "1280x720" (low, medium and high quality respectively)

    "640x480"
    
    videoSimulcast?: boolean

    Use Simulcast video on WebRTC Publishers. Senders will encode duplicate video streams with different qualities, so the media server is able to select the most appropriate quality stream for each Subscriber. This setting is honored only if OpenVidu Server was configured to use the mediasoup media server. Otherwise, Simulcast will be disabled.

    videoSource?: string | boolean | MediaStreamTrack

    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 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"}). For Firefox (<66) "screen" string will ask for permissions to share the entire screen. To ask for a specific window or application, use "window" string instead (this only applies to Firefox).
    • A MediaStreamTrack obtained from a MediaStream object with OpenVidu.getUserMedia
    • false or null to have an audio-only publisher
    _Default camera_