1.2.8 • Published 3 years ago

podchat-video-call-sandbox v1.2.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

javascript component for podchat video call

import reference

import VideoCall from 'podchat-video-call-sandbox';

how to use

import * as PodChat from 'podchat-browser';

    var params = {
      appId: "appId",
      /**
       * Sand Box
       */
      socketAddress: "wss://chat-sandbox.pod.ir/ws",
      ssoHost: "https://accounts.pod.ir",
      platformHost: "https://sandbox.pod.ir:8043/srv/basic-platform",
      fileServer: 'https://core.pod.ir',
      podSpaceFileServer: 'https://podspace.pod.ir',
      serverName: "chat-server",

      token: 'token',// pod token
      grantDeviceIdFromSSO: false,
      enableCache: false,
      fullResponseObject: true,
      typeCode: "default",
      wsConnectionWaitTime: 500,
      connectionRetryInterval: 5000,
      connectionCheckTimeout: 10000,
      messageTtl: 24 * 60 * 60,
      reconnectOnClose: true,
      httpRequestTimeout: 30000,
      httpUploadRequestTimeout: 0,
      forceWaitQueueInMemory: true,
      asyncRequestTimeout: 20000,
      callOptions: {
        callSocketAddress: "wss://46.32.6.187",
        callTurnIp: "46.32.6.188",
        callDivId: "call-div",
        callAudioTagClassName: "podcall-audio",
        callVideoTagClassName: "podcall-video"
      },
      asyncLogging: {
        onFunction: true,
        consoleLogging: true,
        onMessageReceive: false,
        onMessageSend: false,
        actualTiming: false
      }
    };

    this.chatAgent = new PodChat(params);
    this.chatAgent.on("chatReady", () => {
      console.log("ready");
      initVideoComponent();
    });

    this.chatAgent.on("error", (err) => {
      console.error(err);

    }); 

  function initVideoComponent(){
    let videoCall = new VideoCall(
   'call-container', // HTML element ID that you want to load video 
    component on it.
    {
     chatAgent: chatAgent // ChatAgent that is created using podchat SDK
      endCallback: endCall // this event will raise when video call is ended
    });

   videoCall.render();
 }

 function endCall(){

 } 
1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago