Finalizar Compra – Go Music Labs
body { font-family: sans-serif; background: #111; color: #fff; text-align: center; padding: 20px; }
.container { max-width: 800px; margin: auto; }
iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; }
.licencias { display: flex; justify-content: space-around; margin-top: 20px; gap: 10px; }
.card { background: #222; padding: 15px; border-radius: 8px; flex: 1; border: 1px solid #333; }
.btn { display: block; background: #e6b800; color: #000; padding: 10px; text-decoration: none; border-radius: 5px; font-weight: bold; margin-top: 10px; }
// ESTA ES LA MAGIA DEL JAVASCRIPT
// 1. Obtener el ID del video de la URL (ej: compra.html?id=ABC123XYZ)
const params = new URLSearchParams(window.location.search);
const beatId = params.get(‘id’);
if (beatId) {
// 2. Insertar el video en el reproductor
document.getElementById(‘youtube-player’).src = `https://www.youtube.com/embed/${beatId}?autoplay=1`;
// 3. Opcional: Aquí el programador conectará la API para traer el título real.
// Por ahora, le ponemos un texto genérico profesional.
document.getElementById(‘beat-title’).innerText = «Estás escuchando: » + beatId;
} else {
document.getElementById(‘beat-title’).innerText = «No se seleccionó ningún beat.»;
}