Added a STOPPED state to indicate that we've reached

the end and are not paused. Support it for FLV and MP3.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@783 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2009-03-19 00:04:09 +00:00
parent 6f101a4b5f
commit aa8eea91d3
3 changed files with 6 additions and 2 deletions
@@ -243,7 +243,8 @@ public class FlvVideoPlayer extends EventDispatcher
handlePositionCheck(); // if we never got metadata, retrieve final position as dur
// rewind to the beginning
_netStream.seek(0);
pause();
_netStream.pause();
updateState(MediaPlayerCodes.STATE_STOPPED);
}
break;
@@ -27,5 +27,8 @@ public class MediaPlayerCodes
public static const STATE_PLAYING :int = 2;
public static const STATE_PAUSED :int = 3;
/** Indicates that the playhead reached the end and the media has stopped. */
public static const STATE_STOPPED :int = 4;
}
}
@@ -250,7 +250,7 @@ public class Mp3AudioPlayer extends EventDispatcher
if (_loop) {
play0();
} else {
updateState(MediaPlayerCodes.STATE_PAUSED);
updateState(MediaPlayerCodes.STATE_STOPPED);
}
}