Viendo del Buffer mensaje / MC con Componente FLVPlayback.

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 9:48 am

Versión de Flash CS3
COMO versión AS3
Dificultad - AS2 de Flash 8 - mejor que la media.
Dificultad - AS3 - un poco mejor que el principiante.

Problema:
Creación de una película mediante FLV CS3 / AS3 componente FLVPlayback.
¿Tienes problemas con cuestiones de memoria - gran archivo FLV 23 MB

Deseo añadir texto o un clip de película de animación que muestra una "memoria" mensaje antes de que la película se ha cargado lo suficiente como para jugar y jugar si el jefe de capturas el buffer, que yo quiero que muestran una vez más hasta que la película ha rebuffered y luego desaparecen cuando que comienza a jugar de nuevo.

Ive visto innumerables puestos y los vínculos de búsquedas de Google sobre cómo se puede hacer esto con un jugador personalizado utilizando Netstream, pero con una diablos de un tiempo para encontrar todo lo que muestra cómo hacerlo con el componente FLVPlayback.

¿Qué he hecho:

Este es mi video tal como está en este momento.
http://www.boastingrights.com/mark/g...sa_solo-2.html

He añadido una barra de progreso por las instrucciones de este tutorial
http://www.adobe.com/devnet/flash/ar...ing_print.html
(He utilizado la sección titulada: "Agregando un componente barra de progreso" - el código es idéntico a lo que se muestra allí.)

Sin embargo, a pesar de que la barra de progreso se muestra, no es lo suficientemente largo como para muestra basta la de FLV a tamponado para jugar sin problemas.

De ahí mi interés en la adición de un "buffer" mensaje.
O eso, o mostrar la barra de progreso durante el tiempo suficiente para amortiguación suficiente de la película para que no salte o pérdida inicial durante la reproducción.

Gracias.
Marca
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Abril 6th, 2009, 9:48 am

  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Abril 6th, 2009, 10:11 am

¿Realmente cambiar la configuración de tiempo de búfer? (ya sea a través de secuencias de comandos o el inspector de componentes) Adobe dice que no es realmente un problema, pero Ive encontró que se puede tratar de forzar un poco más de un búfer. En cuanto al mensaje que usted sólo tiene que comprobar para ver si el clip es de amortiguación o no utilizar el FLVPlayback.state así que algo como
Código: [ Select ]
if(FLVPlayback.state =="buffereing"){//show msg}
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 10:22 am

graphixboy escribió:
¿Realmente cambiar la configuración de tiempo de búfer? (ya sea a través de secuencias de comandos o el inspector de componentes) Adobe dice que no es realmente un problema, pero Ive encontró que se puede tratar de forzar un poco más de un búfer. En cuanto al mensaje que usted sólo tiene que comprobar para ver si el clip es de amortiguación o no utilizar el FLVPlayback.state así que algo como
Código: [ Select ]
if(FLVPlayback.state =="buffereing"){//show msg}



Bueno thats en parte mi problema. En bufferTime AS3 ya no está disponible para poner en el inspector de componentes y no puedo encontrar instrucciones de cómo ponerlo en AS3 para el componente FLVPlayback. Y el problema es que no sé action script 3 suficientemente bien aún no sabemos cómo configurar un detector para el estado de amortiguación por no hablar de cómo mostrar un mensaje de búfer si es de amortiguación.

Estado buscando toda la mañana y todo, encontrar Im son las cosas relacionadas con Netstream pero no FLVPlayback hacer una descarga progresiva.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 10:28 am

Nota al margen.

Encontré este
http://www.afcomponents.com/tutorials/f ... r_as3/211/

Creo que es a lo que im después, pero con un tiempo difícil encontrar la manera de hacer que funcione con lo que tengo. Como se ha señalado, mi script de acción es idéntico a lo que actualmente se encuentra en el enlace que he proporcionado anteriormente. Para una referencia rápida

Código: [ Select ]
import fl.video.*;
import fl.controls.ProgressBarMode;



// Set Variables
var flvControl = display;
var flvSource = "solo01.flv";



// Create event handler functions to control the progressbar
function progressHandler(event:VideoProgressEvent):void
{
var bl = Math.round(event.bytesLoaded/1000);
var bt = Math.round(event.bytesTotal/1000);

// Update progress...
pb.setProgress(bl,bt);
}

function readyHandler(event:VideoEvent):void
{
// Remove progressbar when we start playing...
removeChild(pb);
}

// Set progress bar state
pb.mode = ProgressBarMode.MANUAL;
pb.indeterminate = false;

// Add listeners and load the video
flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
flvControl.addEventListener(VideoEvent.READY, readyHandler);
flvControl.source = flvSource;
  1. import fl.video.*;
  2. import fl.controls.ProgressBarMode;
  3. // Set Variables
  4. var flvControl = display;
  5. var flvSource = "solo01.flv";
  6. // Create event handler functions to control the progressbar
  7. function progressHandler(event:VideoProgressEvent):void
  8. {
  9. var bl = Math.round(event.bytesLoaded/1000);
  10. var bt = Math.round(event.bytesTotal/1000);
  11. // Update progress...
  12. pb.setProgress(bl,bt);
  13. }
  14. function readyHandler(event:VideoEvent):void
  15. {
  16. // Remove progressbar when we start playing...
  17. removeChild(pb);
  18. }
  19. // Set progress bar state
  20. pb.mode = ProgressBarMode.MANUAL;
  21. pb.indeterminate = false;
  22. // Add listeners and load the video
  23. flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
  24. flvControl.addEventListener(VideoEvent.READY, readyHandler);
  25. flvControl.source = flvSource;
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 12:37 pm

OK, Ive parcialmente resuelto lo del buffering. Este es mi código actual:

Código: [ Select ]
import fl.video.*;
import fl.controls.ProgressBarMode;
import fl.transitions.*;
import fl.transitions.easing.*;
 
 
// Set Variables
var flvControl = display;
var flvSource = "solo01.flv";
 
display.bufferTime = 30;
 
mcBufferingIndicator.visible = true;
 
function onPlayerBuffered(event:VideoEvent) {
    TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
}
display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
 
 
// Create event handler functions to control the progressbar
function progressHandler(event:VideoProgressEvent):void
{
   var bl = Math.round(event.bytesLoaded/1000);
   var bt = Math.round(event.bytesTotal/1000);
 
   // Update progress...
   pb.setProgress(bl,bt);
}
 
function readyHandler(event:VideoEvent):void
{
   // Remove progressbar when we start playing...
   removeChild(pb);
}
 
// Set progress bar state
pb.mode = ProgressBarMode.MANUAL;
pb.indeterminate = false;
 
// Add listeners and load the video
flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
flvControl.addEventListener(VideoEvent.READY, readyHandler);
flvControl.source = flvSource;
 
 
 
  1. import fl.video.*;
  2. import fl.controls.ProgressBarMode;
  3. import fl.transitions.*;
  4. import fl.transitions.easing.*;
  5.  
  6.  
  7. // Set Variables
  8. var flvControl = display;
  9. var flvSource = "solo01.flv";
  10.  
  11. display.bufferTime = 30;
  12.  
  13. mcBufferingIndicator.visible = true;
  14.  
  15. function onPlayerBuffered(event:VideoEvent) {
  16.     TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
  17. }
  18. display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
  19.  
  20.  
  21. // Create event handler functions to control the progressbar
  22. function progressHandler(event:VideoProgressEvent):void
  23. {
  24.    var bl = Math.round(event.bytesLoaded/1000);
  25.    var bt = Math.round(event.bytesTotal/1000);
  26.  
  27.    // Update progress...
  28.    pb.setProgress(bl,bt);
  29. }
  30.  
  31. function readyHandler(event:VideoEvent):void
  32. {
  33.    // Remove progressbar when we start playing...
  34.    removeChild(pb);
  35. }
  36.  
  37. // Set progress bar state
  38. pb.mode = ProgressBarMode.MANUAL;
  39. pb.indeterminate = false;
  40.  
  41. // Add listeners and load the video
  42. flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
  43. flvControl.addEventListener(VideoEvent.READY, readyHandler);
  44. flvControl.source = flvSource;
  45.  
  46.  
  47.  


Básicamente, he añadido un clip de película de texto estático "Buffering..."
Hicieron visibles inicialmente y ha aumentado el tiempo de búfer, añadiendo: display.bufferTime = 30;
(visualización es el nombre de la instancia de mi componente de reproducción).

Al comienzo de la película que hace lo que su supuesto.

Nuevos problemas:
El indicador de posición de la barra de reproducción desaparecido.
Si la cabeza lectora alcanza el búfer y la película tiene que volver a zonas de separación, que no muestra la "Buffering..." Clip de película hasta que se haya amortiguado bastante nuevo, y entonces el evento onPlayerBuffered patadas y muestra el buffer palabra...el tiempo suficiente para que se desvanecen.

Sé que sólo hay que crear un nuevo agente de escucha de manera que si vuelve a buffering sólo necesito establecer la visibilidad mcBufferingIndicator volver a verdad, pero no sabe cómo se escribe que escucha.


Heres la película revisado.
http://www.boastingrights.com/mark/gods ... olo-3.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 1:30 pm

OK, he resuelto el problema con el redisplaying "Buffering..." Texto cuando el vídeo se remonta a buffering. Ahora sólo tiene que averiguar por qué el indicador de posición del cursor de reproducción ya no se muestra.

¿Cómo lo resolví, he comprobado en los hechos fl.video y encontró un caso BUFFERING_STATE_ENTERED. (Heres un buen recurso en eventos de vídeo, btw -- http://livedocs.adobe.com/flash/9.0/Act ... Event.html )

Así que básicamente he creado una función para onPlayerNotBuffered y un detector para el evento BUFFERING_STATE_ENTERED. Código Revisado:

Código: [ Select ]
import fl.video.*;
import fl.controls.ProgressBarMode;
import fl.transitions.*;
import fl.transitions.easing.*;


// Set Variables
var flvControl = display;
var flvSource = "solo01.flv";

display.bufferTime = 30;


//fade the mcBufferingIndicator when buffered.
function onPlayerBuffered(event:VideoEvent)
{
    
    TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
}

display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);

//Display the mcBufferingIndicator when buffering.
function onPlayerNotBuffered(event:VideoEvent)
{
mcBufferingIndicator.visible = true;
}
display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);

// Create event handler functions to control the progressbar
function progressHandler(event:VideoProgressEvent):void
{
var bl = Math.round(event.bytesLoaded/1000);
var bt = Math.round(event.bytesTotal/1000);

// Update progress...
pb.setProgress(bl,bt);
}

function readyHandler(event:VideoEvent):void
{
// Remove progressbar when we start playing...
removeChild(pb);
}

// Set progress bar state
pb.mode = ProgressBarMode.MANUAL;
pb.indeterminate = false;

// Add listeners and load the video
flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
flvControl.addEventListener(VideoEvent.READY, readyHandler);
flvControl.source = flvSource;
  1. import fl.video.*;
  2. import fl.controls.ProgressBarMode;
  3. import fl.transitions.*;
  4. import fl.transitions.easing.*;
  5. // Set Variables
  6. var flvControl = display;
  7. var flvSource = "solo01.flv";
  8. display.bufferTime = 30;
  9. //fade the mcBufferingIndicator when buffered.
  10. function onPlayerBuffered(event:VideoEvent)
  11. {
  12.     
  13.     TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
  14. }
  15. display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
  16. //Display the mcBufferingIndicator when buffering.
  17. function onPlayerNotBuffered(event:VideoEvent)
  18. {
  19. mcBufferingIndicator.visible = true;
  20. }
  21. display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);
  22. // Create event handler functions to control the progressbar
  23. function progressHandler(event:VideoProgressEvent):void
  24. {
  25. var bl = Math.round(event.bytesLoaded/1000);
  26. var bt = Math.round(event.bytesTotal/1000);
  27. // Update progress...
  28. pb.setProgress(bl,bt);
  29. }
  30. function readyHandler(event:VideoEvent):void
  31. {
  32. // Remove progressbar when we start playing...
  33. removeChild(pb);
  34. }
  35. // Set progress bar state
  36. pb.mode = ProgressBarMode.MANUAL;
  37. pb.indeterminate = false;
  38. // Add listeners and load the video
  39. flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
  40. flvControl.addEventListener(VideoEvent.READY, readyHandler);
  41. flvControl.source = flvSource;



Revisado de vídeo
http://www.boastingrights.com/mark/gods ... olo-4.html


Ahora todo lo que necesitamos saber es por qué mi barra de reproducción indicador desaparecido y la forma de recuperarlo.
La experiencia del hombre lo que es un aprendizaje divertido es esto! jajaja
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 2:19 pm

OK me enteré por qué está en proceso de desaparición de este puesto de mayor edad:

http://board.flashkit.com/board/showthread.php?t=734399

En realidad en el nombre de instancia CS3 es ahora seekBarHandle_mc

Malos lío con la reducción de la memoria tiempo después de casa y ver qué pasa.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 6th, 2009, 4:57 pm

Me bajó el buffer a 2 e incluso nixed por completo y, al menos, la muestra seekbar la mayor parte del tiempo, pero sus esporádicos. E Im aún no está contento con la memoria. Todavía demasiado entrecortado. 23MB no es tan grande para un FLV. Siento como la primera reproducción debe ser mucho más suave.

Heres lo que parece en este momento. Probado en IE7 y IE8, FF de safari y ópera.

http://www.boastingrights.com/mark/gods ... olo-5.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Abril 8th, 2009, 1:23 pm

Parece que tienes que trabajar. Lo siento, no era más ayuda. Empecé un nuevo trabajo esta semana y la vida ha sido un poco loco, pero hey im alegro de que funcione.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • fitzpatrick1982
  • Born
  • Born
  • No Avatar
  • Registrado: Abr 24, 2009
  • Mensajes: 2
  • Status: Offline

Nota Abril 26th, 2009, 11:57 pm

Hola Sr. Presidente

Perdón por la interrupción...
¿Puedo preguntarle algo señor?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 27th, 2009, 4:32 am

Theres no interuption. ¿Cuál es su pregunta?
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Publicar Información

  • Total de mensajes en este tema: 11 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 54 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC