Commit cd8fcaf9 authored by Muhammadali's avatar Muhammadali

update-

parent 69319d41
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.7.10", "version": "4.8.0",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -58,11 +58,13 @@ export class BoxDialer { ...@@ -58,11 +58,13 @@ export class BoxDialer {
sipDomain; sipDomain;
player; player;
strmTrack; strmTrack;
isRestarting;
constructor() { constructor() {
this.played = false; this.played = false;
document.body.addEventListener('click', () => { document.body.addEventListener('click', () => {
this.played = true; this.played = true;
}); });
this.isRestarting=false
this.videoRemote = document.createElement('video'); this.videoRemote = document.createElement('video');
this.videoLocal = document.createElement('video'); this.videoLocal = document.createElement('video');
this.remoteAudio = document.createElement('audio'); this.remoteAudio = document.createElement('audio');
......
...@@ -85,7 +85,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -85,7 +85,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
// '==========------------reg_checking: ', // '==========------------reg_checking: ',
// boxDialer.isUaRunning(), // boxDialer.isUaRunning(),
// ); // );
if (boxDialer.isUaRunning()) { if (boxDialer.isUaRunning() || this.isRestarting) {
setTimeout(waitUaRegisterLost, 10); setTimeout(waitUaRegisterLost, 10);
} else { } else {
boxDialer.sipRegister(wsphonedata); boxDialer.sipRegister(wsphonedata);
...@@ -157,6 +157,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -157,6 +157,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
window.onbeforeunload = () => { window.onbeforeunload = () => {
if (typeof BX !== 'undefined') { if (typeof BX !== 'undefined') {
this.isRestarting = true;
console.log('window_onbeforeunload =============-------------'); console.log('window_onbeforeunload =============-------------');
localStorage.removeItem('mycall'); localStorage.removeItem('mycall');
localStorage.removeItem(BX.bitrix_sessid() + '_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