@nethesis/phone-island
Version:
NethVoice CTI Phone Island
3 lines (2 loc) • 663 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./extension.js"),t=require("../../store/index.js");exports.webrtcCheck=function(o){var i=(new Date).getTime(),r=t.store.getState().webrtc,a=r.lastActivity,n=r.INACTIVE_DEADLINE_TIME,s=a?i-a:i;s>n&&e.isWebrtcTotallyFree()?(console.debug("janus inactive for "+Math.round(s/1e3)+" sec (> deadline: "+n/1e3+"): force reactivation"),o()):s>n&&!e.isWebrtcTotallyFree()?console.debug("janus is in conversation: no reactivation"):console.debug("janus last activity detected "+Math.round(s/1e3)+" sec ago (< deadline: "+n/1e3+"): no reactivation")};
//# sourceMappingURL=connection.js.map