Skip to content

Instantly share code, notes, and snippets.

@mohsenk
Created October 2, 2019 07:26
Show Gist options
  • Save mohsenk/a6bb46e96e2dff73cd74dfc0f47f886b to your computer and use it in GitHub Desktop.
Save mohsenk/a6bb46e96e2dff73cd74dfc0f47f886b to your computer and use it in GitHub Desktop.

Revisions

  1. Mohsen created this gist Oct 2, 2019.
    29 changes: 29 additions & 0 deletions Test.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    self.kavenegarCall.initCall(params, (joinResult, call) => {
    if (call == null) {
    window.location.hash = "";
    return;
    }
    if (call.direction === CallDirection.INBOUND) {
    call.ringing();
    }

    this.setConversationUI();
    this.currentCall = call;

    call.onFinished = (reason) => {
    this.setCallUI();
    window.location.hash = "";
    this.currentCall = null;
    call.dispose();
    };
    call.onMediaStateChanged = (event) => {
    };

    call.onMessagingStateChanged = (event) => {
    };

    call.onStatusChanged = (status) => {
    };


    });