OK, Ive parcialmente resuelto lo del buffering. Este es mi código actual:
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;
- 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;
-
-
-
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.