From 9931cae098f9ac8a765209b53ea00513a90058f7 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 12 Nov 2008 18:34:03 +0000 Subject: [PATCH] Comments. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@699 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../com/threerings/flash/video/VideoPlayer.as | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/as/com/threerings/flash/video/VideoPlayer.as b/src/as/com/threerings/flash/video/VideoPlayer.as index 1c0b59ce..5c2e169e 100644 --- a/src/as/com/threerings/flash/video/VideoPlayer.as +++ b/src/as/com/threerings/flash/video/VideoPlayer.as @@ -12,30 +12,41 @@ import flash.geom.Point; import com.threerings.util.ValueEvent; /** + * Dispatched when the state of the videoplayer changes, usually in response to commands + * such as play/pause, etc. + * value: an int state. @see VideoPlayerCodes * * @eventType com.threerings.flash.video.VideoPlayerCodes.STATE */ [Event(name="state", type="com.threerings.util.ValueEvent")] /** + * Dispatched when the total duration of the video is known. + * value: a Number expressing the duration in seconds. * * @eventType com.threerings.flash.video.VideoPlayerCodes.DURATION */ [Event(name="duration", type="com.threerings.util.ValueEvent")] /** + * Dispatched periodically as the position is updated, during playback. + * value: a Number expressing the position in seconds. * * @eventType com.threerings.flash.video.VideoPlayerCodes.POSITION */ [Event(name="position", type="com.threerings.util.ValueEvent")] /** + * Disptached when the size of the video is known. + * value: a Point expressing the width/height. * * @eventType com.threerings.flash.video.VideoPlayerCodes.SIZE */ [Event(name="size", type="com.threerings.util.ValueEvent")] /** + * Dispatched when there's a problem. + * value: a String error code/message. * * @eventType com.threerings.flash.video.VideoPlayerCodes.ERROR */ @@ -61,17 +72,23 @@ public interface VideoPlayer extends IEventDispatcher */ function getSize () :Point; + /** + * Play the video, if not already. + */ function play () :void; + /** + * Pause the video, if not already. + */ function pause () :void; /** - * Get the duration of the video, or NaN if not yet known. + * Get the duration of the video, in seconds, or NaN if not yet known. */ function getDuration () :Number; /** - * Get the position of the video, or NaN if not yet ready. + * Get the position of the video, in seconds, or NaN if not yet ready. */ function getPosition () :Number;