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:
@@ -243,7 +243,8 @@ public class FlvVideoPlayer extends EventDispatcher
|
|||||||
handlePositionCheck(); // if we never got metadata, retrieve final position as dur
|
handlePositionCheck(); // if we never got metadata, retrieve final position as dur
|
||||||
// rewind to the beginning
|
// rewind to the beginning
|
||||||
_netStream.seek(0);
|
_netStream.seek(0);
|
||||||
pause();
|
_netStream.pause();
|
||||||
|
updateState(MediaPlayerCodes.STATE_STOPPED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -27,5 +27,8 @@ public class MediaPlayerCodes
|
|||||||
public static const STATE_PLAYING :int = 2;
|
public static const STATE_PLAYING :int = 2;
|
||||||
|
|
||||||
public static const STATE_PAUSED :int = 3;
|
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) {
|
if (_loop) {
|
||||||
play0();
|
play0();
|
||||||
} else {
|
} else {
|
||||||
updateState(MediaPlayerCodes.STATE_PAUSED);
|
updateState(MediaPlayerCodes.STATE_STOPPED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user