Commit cd8fcaf9 authored by Muhammadali's avatar Muhammadali

update-

parent 69319d41
{
"name": "boxdialer",
"version": "4.7.10",
"version": "4.8.0",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -58,11 +58,13 @@ export class BoxDialer {
sipDomain;
player;
strmTrack;
isRestarting;
constructor() {
this.played = false;
document.body.addEventListener('click', () => {
this.played = true;
});
this.isRestarting=false
this.videoRemote = document.createElement('video');
this.videoLocal = document.createElement('video');
this.remoteAudio = document.createElement('audio');
......
......@@ -85,7 +85,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
// '==========------------reg_checking: ',
// boxDialer.isUaRunning(),
// );
if (boxDialer.isUaRunning()) {
if (boxDialer.isUaRunning() || this.isRestarting) {
setTimeout(waitUaRegisterLost, 10);
} else {
boxDialer.sipRegister(wsphonedata);
......@@ -157,6 +157,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
window.onbeforeunload = () => {
if (typeof BX !== 'undefined') {
this.isRestarting = true;
console.log('window_onbeforeunload =============-------------');
localStorage.removeItem('mycall');
localStorage.removeItem(BX.bitrix_sessid() + '_mycall');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment