Foros del Web » Programando para Internet » Javascript »

API youtube

Estas en el tema de API youtube en el foro de Javascript en Foros del Web. Hola en mi pagina web asta ahora siempre he gastado este código: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original < html lang = "es-ar" > < ...
  #1 (permalink)  
Antiguo 12/06/2013, 16:06
 
Fecha de Ingreso: junio-2009
Mensajes: 80
Antigüedad: 14 años, 10 meses
Puntos: 2
API youtube

Hola en mi pagina web asta ahora siempre he gastado este código:
Código HTML:
Ver original
  1. <html lang="es-ar">
  2. <meta charset="utf-8" />
  3. <title>Estado del reproductor de viseo You tube</title>
  4. <script src = "http://www.youtube.com/player_api"></script>
  5. </head>
  6. <iframe id="reproductor" width="640" height="360"   src="http://www.youtube.com/embed/JW5meKfy3fY" onload="status_video()" frameborder="0" allowfullscreen="">
  7. var player;
  8.   function status_video(){
  9.     player = new YT.Player('reproductor', {
  10.       videoId: 'JW5meKfy3fY',
  11.       events:
  12.        {      
  13.         'onStateChange': function (event)
  14.             {
  15.             if (event.data == YT.PlayerState.PLAYING){
  16.             alert("Reproduciendo video..");
  17.             }else if (event.data == YT.PlayerState.PAUSED){
  18.             alert ("Video en Pausa..");
  19.             }
  20.            
  21.             else if (event.data == YT.PlayerState.ENDED){
  22.             alert ("Video finalizado...");
  23.             }
  24.            
  25.             else if (event.data == YT.PlayerState.BUFFERING){
  26.             alert ("Almacenando en el buffer...");
  27.             }
  28.              }
  29.        }
  30.            
  31.     });
  32.   }
  33. </body>
  34. </html>

Este es el ejemplo, tiene que decir con un alert cuando se pausa inicia... pero ahora ya no funciona... Youtube a cambiado la API? O que esta pasando?

http://foros.emprear.com/video/estat...o_youtube.html
  #2 (permalink)  
Antiguo 14/06/2013, 05:15
 
Fecha de Ingreso: junio-2009
Mensajes: 80
Antigüedad: 14 años, 10 meses
Puntos: 2
Respuesta: API youtube

Ya funciona se ve que la api no funcionaba.

Etiquetas: api, funcion, html, youtube
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:37.