diff --git a/modules/UI/ring_overlay/RingOverlay.js b/modules/UI/ring_overlay/RingOverlay.js index b44ef6627..806a278f7 100644 --- a/modules/UI/ring_overlay/RingOverlay.js +++ b/modules/UI/ring_overlay/RingOverlay.js @@ -27,12 +27,16 @@ class RingOverlay { constructor(callee) { this._containerId = 'ringOverlay'; this._audioContainerId = 'ringOverlayRinging'; - + this.isRinging = true; this.callee = callee; this.render(); this.audio = document.getElementById(this._audioContainerId); this.audio.play(); this._setAudioTimeout(); + this._timeout = setTimeout(() => { + this.destroy(); + this.render(); + }, 30000); } /** @@ -54,13 +58,15 @@ class RingOverlay { * Builds and appends the ring overlay to the html document */ _getHtmlStr(callee) { + let callingLabel = this.isRinging? "
Calling...
" : ""; + let callerStateLabel = this.isRinging? "" : " isn't available"; return `Calling...
+ ${callingLabel}${callee.getName()}
+${callee.getName()}${callerStateLabel}