This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git pull | |
| app/console cache:clear --env=dev | |
| app/console cache:clear --env=prod | |
| chmod -R 777 app/cache/ | |
| chmod -R 777 app/logs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="//cdn.voximplant.com/edge/voximplant.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var vox = VoxImplant.getInstance(); | |
| vox.init({micRequired: true}); | |
| vox.addEventListener(VoxImplant.Events.SDKReady, handleSDKReady); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vox.connect(); | |
| vox.addEventListener(VoxImplant.Events.ConnectionEstablished, handleConnectionEstablished); | |
| vox.addEventListener(VoxImplant.Events.ConnectionFailed, handleConnectionFailed); | |
| vox.addEventListener(VoxImplant.Events.ConnectionClosed, handleConnectionClosed); | |
| function handleConnectionEstablished() { | |
| if (typeof console != "undefined") console.log("Connected to VoxImplant:" +vox.connected()); | |
| } | |
| function handleConnectionFailed(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var currentCall = vox.call("exampleUser"); | |
| currentCall.rearangeCodecs = function(codecList){ | |
| return new Promise(function(resolve,reject){ | |
| // example sorting video section to set h256 first | |
| for(var i=0;i<codecList.sections.length;i++){ | |
| if(codecList.sections[i].kind.toLowerCase()=="video"){ | |
| codecList.sections[i].codec.sort((a:string,b:string)=>{ | |
| if(a.toLowerCase().indexOf("h264")!=-1&&a.toLowerCase().indexOf("uc")==-1) return -1; | |
| if(b.toLowerCase().indexOf("h264")!=-1&&b.toLowerCase().indexOf("uc")==-1) return 1; | |
| return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var currentCall = vox.call("exampleUser"); | |
| currentCall.on(VoxImplant.CallEvents.Connected,onConnected); | |
| currentCall.on(VoxImplant.CallEvents.Disconnected,onDisconnected); | |
| currentCall.on(VoxImplant.CallEvents.Failed,onFailed); | |
| currentCall.on(VoxImplant.CallEvents.ICETimeout,onICETimeout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *getData(){ | |
| const perPage = 500; | |
| let page=0; | |
| let maxpage = Number.POSITIVE_INFINITY; | |
| let offset = 0; | |
| while (page<maxpage){ | |
| offset = perPage*page; | |
| yield fetch("https://api.voximplant.com/platform_api/GetCallHistory/",{ | |
| method: 'post', | |
| headers: {"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yum -y groupinstall 'Development Tools' | |
| yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel | |
| OPENSSL="openssl-1.0.2h" | |
| NGINX="nginx-1.11.2-1" | |
| mkdir -p /opt/lib | |
| wget https://www.openssl.org/source/$OPENSSL.tar.gz -O /opt/lib/$OPENSSL.tar.gz | |
| tar -zxvf /opt/lib/$OPENSSL.tar.gz -C /opt/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Google Chrome 54 | |
| codecList = { | |
| "sections":[ | |
| { | |
| "kind":"audio", | |
| "codec": | |
| [ | |
| "opus/48000/2", | |
| "ISAC/16000", | |
| "ISAC/32000", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var section = { | |
| "kind":"audio", | |
| "codec": | |
| [ | |
| "opus/48000/2", | |
| "ISAC/16000", | |
| "ISAC/32000", | |
| "G722/8000", | |
| "PCMU/8000", | |
| "PCMA/8000", |
OlderNewer