diff --git a/modules/UI/ring_overlay/RingOverlay.js b/modules/UI/ring_overlay/RingOverlay.js index 78b433de3..141148ef6 100644 --- a/modules/UI/ring_overlay/RingOverlay.js +++ b/modules/UI/ring_overlay/RingOverlay.js @@ -11,25 +11,31 @@ 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); } /** * 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}