PIOPIY video JS SDK allows you to make and receive video calls, where making video calls can be made to APP to APP,APP to Browser and browser to browser calling.
The PIOPIY SDK object needs to be initialized.
var piopiy = new PIOPIY( {
name: 'Display Name',
debug: false,
ringTime: 60
} );
Below is the configuration parameters
Attribute | Description | Allowed Values | Default Value |
---|---|---|---|
name | Your Display Name in App | string | null |
debug | Enable debug message in JS log | true, false | false |
ringTime | Your incoming call ringing time in seconds | number | 60 |
Validate your login ID and password.
piopiy.login('YOUR_USERNAME','YOUR_PASSWORD');
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | You have Logged in successfully |
401 | Your Login ID or Password is invalid, Authenication failed |
1001 | You have already logged in |
Make an video call to other user(SIP or WebRTC entpoind).
piopiy.call('username',{audio:true,video:true});
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
100 | Your outbound call status, status: trying |
183 | Your Outbound call status, status: ringing |
200 | Your Outbound call status, status: answered, busy, unreachable, call ended |
1002 | Your already in a call |
Answer an incoming call.
piopiy.answer({audio:true,video:true});
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
183 | Your incoming call status, status: ringing |
200 | Your incoming call status, status: answered, canceled, call ended |
1002 | Your already in a call |
Reject an incoming call.
piopiy.reject();
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | Your incoming call status, status: hangup |
1002 | Currently, there is no ongoing calls |
Hangup the ongoing call.
piopiy.terminate();
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | Your ongoing call status, status: hangup |
1002 | Currently, there is no ongoing calls |
Send the digits as dtmf. Digits can be any of the following one character strings: "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "#"
piopiy.sendDtmf(DTMF_DIGIT);
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | DTMF digit received |
1002 | DTMF not allowed or ongoing call not found |
1005 | Invalid DTMF type |
Mute an incoming or outgoing call.
piopiy.mute();
Mute an incoming or outgoing call.
piopiy.unMute();
Mute an incoming or outgoing call.
piopiy.hold();
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | Hold your current call |
1002 | Your call is already on hold or there is no call found to hold |
Mute an incoming or outgoing call.
piopiy.unHold();
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | Unhold your current call |
1002 | First hold a call to unhold it or there is no call found to unhold |
Logout
piopiy.logout();
PIOPIY platform represents the following status code to identify the errors.
Status code | Description |
---|---|
200 | You have logged out sucessfully |
1002 | To logout you need to login first |