<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>xzy radio:: documentacion</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Geany 0.14" /> </head> <body> <span style="font-weight: bold;"><big>xzyradio:: radio empotrada y simple en web</big><br> </span> <p style="color: rgb(0, 0, 128);"><span style="font-weight: bold;"><span style="text-decoration: underline;">Descripción</span></span></p> <p><span style="font-weight: bold;"></span></p> <div style="text-align: justify;"> <p>Esta clase sirve para empotrar un reproductor de una radio online, en páginas web.</p> <p>Su despliegue es simple, usando "<span style="color: rgb(0, 0, 128); font-weight: bold;">echo</span>" o el formato compacto para variable "<span style="font-weight: bold;"><span style="color: rgb(0, 0, 255);"><?</span>=<span style="color: rgb(0, 128, 128);">$variable</span><span style="color: rgb(0, 0, 255);">?></span></span>"</p> <p>Genera una etiqueta <span style="font-weight: bold; color: rgb(0, 0, 128);"><embed></span> con los atributos necesarios para mostrar un reproductor con autoejecución.<br> </p> Está pensado especialmente para reproducir un streaming de Shoutcast, aunque debe ser capaz de reproducir otros tipos de media, dependiendo del plugin de reproductor multimedia instalado localmente.</div> <p style="color: rgb(0, 0, 128);"><span style="font-weight: bold; text-decoration: underline;">Plataformas comprobadas</span>:</p> Firefox 3.0 /VLC plugin /Ubuntu 8.10<br> Internet Explorer 6.0 /WMP plugin /Windows XP SP2<br> <br> PHP 5.2<br> <br> <span style="text-decoration: underline; font-weight: bold; color: rgb(0, 0, 128);">Tipos de media comprobados</span><br><br> stream de shoutcast<br> archivo pls<br> archivo asx<br> <br> <span style="text-decoration: underline; font-weight: bold; color: rgb(0, 0, 128);">Metodos</span><br> __construct($src) : El url del recurso a reproducir.<br> <br> attrib($name, $value) : Nombre y valor del atributo de la etiqueta embed generada.<br> <br> <span style="color: rgb(0, 0, 128); text-decoration: underline; font-weight: bold;">Atributos comunes:</span><br> width, height : dimensiones - default 200,45.<br> autostart: (True,False) Autoejecución - default True <br> loop: (True, False) - default False<br> volume: nivel de reproducción - default 30<br> src: URL del medio a reproducir<br> <br> <span style="text-decoration: underline; font-weight: bold; color: rgb(0, 0, 128);">Ejemplo de uso</span><br> <br> <div style="text-align: left; background-color: rgb(224, 224, 224);"><span style="font-family: monospace; color: rgb(0, 0, 255); font-weight: bold;"><?php</span><br style="font-family: monospace;"> <span style="font-family: monospace; font-weight: bold;"><span style="color: rgb(0, 0, 128);">require_once</span> <span style="color: rgb(192, 0, 192);">'xzyradio.php'</span>;</span><br style="font-family: monospace; font-weight: bold;"> <span style="font-family: monospace; font-weight: bold;"><span style="color: rgb(0, 128, 128);">$radio</span> = <span style="color: rgb(0, 0, 128);">new</span> xzyradio (<span style="color: rgb(192, 0, 192);">'http://radiodoblenueve.com:9900/'</span>);</span><br style="font-family: monospace; font-weight: bold;"> <span style="font-family: monospace; font-weight: bold;"><span style="color: rgb(0, 128, 128);">$radio</span>->attrib(<span style="color: rgb(192, 0, 192);">'autostart'</span>,<span style="color: rgb(192, 0, 192);">'False'</span>);</span><span style="color: rgb(128, 128, 128); font-family: monospace; font-weight: bold;"> //opcional</span><br style="font-family: monospace; font-weight: bold;"> <br style="font-family: monospace; font-weight: bold;"> <span style="font-family: monospace; font-weight: bold; color: rgb(128, 128, 128);">//echo $radio;</span><br style="font-family: monospace; font-weight: bold;"> <br style="font-family: monospace; font-weight: bold;"> <span style="font-family: monospace; font-weight: bold; color: rgb(0, 0, 255);">?></span><br style="font-family: monospace; font-weight: bold;"> <br style="font-family: monospace; font-weight: bold;"> <span style="font-family: monospace; font-weight: bold;"><span style="color: rgb(0, 0, 255);"><?</span>=<span style="color: rgb(0, 128, 128);">$radio</span><span style="color: rgb(0, 0, 255);">?></span></span><br> </div> </body> </html>