instaVC logo
Documentation

Client ID:

Peer ID:

Documentation - Version 1.0

How to use this sample?

  1. Open this page in two different tab/location
  2. Provide unique name in client box and connect each tab. (e.g. user1 and user2)
  3. In any of the tab type the other user's uid in rid textbox and make a call
  4. Now you are in call.

Video Conferencing - Simple Setup

The following code will show how to setup instaVC P2P Library for two way audio/video communication with little developer efforts

    let script = document.createElement('script');
    // can load any script, from any domain
    script.src = "js/insta_sdk_1_0.js";
    document.head.append(script);

    script.onload = function () {
        ....
        //
    }

Initialize the Connection to Server

    const instaVC = InstaVC();

    instaVC.loginServer(<<unique-user-id-or-name>>);

Adding Events

    instaVC.on('event-name', (event) => {
        ....
    });

    //List of Events
    localvideo      -   fired when the local video available
    remotevideo     -   fired when the remote video available
    call-connected  -   fired when the call has been established.
    call-initiated  -   fired before call has been established.
    screen-shared   -   fired when the screen has been added.
    screen-ended    -   fired when the screen has been ended.
    mute-video      -   fired when the video has been muted.
    mute-audio      -   fired when the audio has been muted.

Mute Functions

    instaVC.muteVideo()     - Mute the local video.
    instaVC.unmuteVideo()   - Unmute the local video. 
    instaVC.muteAudio()     - Mute the local audio.
    instaVC.unmuteAudio()   - Unmute the local audio.
    instaVC.isVideoEnabled() - Returns true / false based on video track status
    instaVC.isAudioEnabled() - Returns true / false based on audio track status

Screen Share Functions

    instaVC.shareScreen() - Opens the System Share Screen option and 
                            replace the local video track with selected screen.