<script type="text/javascript">
constface2params={
face2Key:"YOUR FACE2 KEY",
tooltip:true,
tooltipText:"Start video call",
cornerRounding:true,
directCall:true,
returnUrl:true,
position:"right",
};
constf2s=window.document.createElement("script");
f2s.defer=true;
(f2s.src="https://face2.oktium.com/face2widget.js"),
(f2s.onload=function() {
newwindow.Oktium(face2params).init();
}),
document.head.appendChild(f2s);
</script>
<div id="face2"></div>` where will be placed Face2 button.
<div id="face2"></div>
<script type="text/javascript">
constface2params={
face2Key:"YOUR FACE2 KEY",
tooltip:true,
tooltipText:"Start video call",
cornerRounding:true,
directCall:true,
returnUrl:true,
};
constf2s=window.document.createElement("script");
f2s.defer=true;
(f2s.src="https://face2.oktium.com/face2widget.js"),
(f2s.onload=function() {
newwindow.Oktium(face2params).init();
}),
document.head.appendChild(f2s);
</script>
Name | Type | Attribute | Description |
params | object | Valid Object, as described above | |
face2Key | string | required | Face2Key generated in Dashboard. |
directCall | boolean | optional default: true |
param.directCall The generated link will start a call. |
tooltip | boolean | optional default: false |
param.tooltip Show Tool tip at mouseover. |
tooltipText | string | optional | param.tooltipText Custom tooltip text, setting it to false will result in using the default text. |
position | string | optional accepts: "left" or "right" |
param.position If Position is set to "left" or "right", then it will render the widget as float/fixed position. |
productName | string | required | productName Name of the product listed on your website. |
returnUrl
|
boolean |
optional default: false |
redirect back after call |
target
|
string | optional default: "face2"
|
element where widget will be rendered |
meta
|
object | optional | include any parameters which you want to pass back to your system after call is done. ie
clientId: "123456",
product:"XYZ",
|
face2Img
|
string | optional | replace Face2 image for your own image |
face2Boost
|
array | optional | add list of branch Id's where would you like your call redirected in case of no answer in your initial destination. |
init()
Initiate the loading of the Face2 button.
getFace2Link()
To wrap your own HTML element into <a> with your Face2 link. It requires you to pass your element ID
getFace2Link('yourCustomElement').
kill()
Remove the Face2 button from your page.
reload()
You can update button configuration by passing new options reload(Face2Params).
on()
May work as a callback when the button is fully loaded on("loaded", callbackFunction).

Comments
0 comments
Please sign in to leave a comment.