kgroundColor = 'transparent';
			}

			wrapper.appendChild(mediaElement);
			mediaContainer.appendChild(wrapper);
			mediaContainer.style.display = 'block';

			// Hide after specified duration
			const hide = () => {
				mediaContainer.style.display = 'none';
				mediaContainer.innerHTML = ''; // Clean up
				statusMessage.style.display = 'block'; // Show status message again
			};
			if (Number(duration) > 0) {
				setTimeout(hide, duration);
			}
		}

        // Function to play audio
        async fun