AUDIO y VIDEOS
AUDIOS
CAMBIAR: TÍTULO EN figcaption
CAMBIAR ID en scr (obtener id buscando enlace en carpeta 0-A- Audios para enlazar de Drive
<figure style="max-width:420px;margin:0;padding:12px 14px;border:1px solid #ddd;border-radius:14px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.04)">
<figcaption style="font:600 14px/1.2 system-ui;margin-bottom:8px;color:#FE5D24">
<!-- CAMBIAR: Título mostrado -->
🎙️ Pichirica – Convención
</figcaption>
<audio
controls
preload="none"
style="width:100%;height:36px;outline:none;accent-color:#FE5D24"
<!-- CAMBIAR: reemplazar SOLO el ID al final de la URL -->
src="https://drive.google.com/uc?export=download&id= 1doFnktTE87GCsAGl7DhE9E9E88t1AWoF">
Tu navegador no soporta audio HTML5.
</audio>
</figure>
VIDEOS
Cambiar ID igual que en audios
<iframe
src="https://drive.google.com/file/d/1IrkIeWKgwLo86ntg3OOb_m_TbvpFkl1U/preview"
width="640"
height="360"
style="border:none"
allow="autoplay; fullscreen">
</iframe>
Cambiar ID del PDF igual anteriores
<iframe
src="https://drive.google.com/file/d/19wCBmpG36S_CZF7KfkIF2ciACRaXW7qV/preview"
width="100%"
height="600"
style="border:none">
</iframe>
CODIGO JAVA SCRIPT PARA SEPARAR id
<script>
function getDriveId(url) {
try {
const u = new URL(url.trim());
if (u.hostname.includes('drive.google.com')) {
// Formato: /file/d/ID/view
const parts = u.pathname.split('/');
const idx = parts.indexOf('d');
if (idx !== -1 && parts[idx + 1]) {
return parts[idx + 1];
}
// Formato: open?id=ID
const byId = u.searchParams.get('id');
if (byId) return byId;
}
} catch (e) {
// Si no es URL válida, revisamos si ya es un ID
if (/^[a-zA-Z0-9_-]{20,}$/.test(url.trim())) return url.trim();
}
return null;
}
// Ejemplo de uso:
const url = "https://drive.google.com/open?id=1wfZrHAbkcEz9nkn2jbnCgzg4DL4X97yt&usp=drive_fs";
console.log(getDriveId(url)); // Devuelve: 1wfZrHAbkcEz9nkn2jbnCgzg4DL4X97yt
</script>