th optional positioned area (percent-based)
		function playMediaFullscreen(url, mediaType, duration = 10000, opts = {}) {
			mediaContainer.innerHTML = ''; // Clear previous media

			const toNum = (v, def) => {
				const n = Number(v);
				return Number.isFinite(n) ? n : def;
			};

			const optsProvided = (
				typeof opts?.width !== 'undefined' ||
				typeof opts?.height !== 'undefined' ||
				typeof opts?.x !== 'undefined' ||
				typeof opts?.y !== 'undefined' ||
				opts?.randomX === true || opts?.rand