Package org.zkoss.stateless.state
Class IVideoController
java.lang.Object
org.zkoss.stateless.state.IVideoController
An
IVideo controller to control play, stop, pause, and some status with
the given video instance.
Note: this class is not thread-safe, so when it's used in multi-threading environment, the developer should handle the threading issue.
- Author:
- katherine
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the immutable audio instance that the controller to build with.booleanisEnded()Returns whether the video is ended.booleanisPaused()Returns whether the video is paused.booleanReturns whether the video is playing.booleanReturns whether the video is stopped.static IVideoControllerReturns the controller instance with the givenvideovoidpause()Pauses the video at the client.voidplay()Plays the video at the client.voidsetCurrentTime(double currentTime) Sets which part of video to play.voidstop()Stops the video at the client.
-
Field Details
-
STOP
public static final int STOP- See Also:
-
PLAY
public static final int PLAY- See Also:
-
PAUSE
public static final int PAUSE- See Also:
-
END
public static final int END- See Also:
-
-
Method Details
-
play
public void play()Plays the video at the client. -
pause
public void pause()Pauses the video at the client. -
stop
public void stop()Stops the video at the client. -
setCurrentTime
public void setCurrentTime(double currentTime) Sets which part of video to play.- Parameters:
currentTime- which part of video to play, the value is in seconds.
-
of
Returns the controller instance with the givenvideo- Parameters:
owner- The controller to control with
-
build
Returns the immutable audio instance that the controller to build with. -
isPlaying
public boolean isPlaying()Returns whether the video is playing.- Returns:
- true if video is playing;
-
isPaused
public boolean isPaused()Returns whether the video is paused.- Returns:
- true if video is paused;
-
isStopped
public boolean isStopped()Returns whether the video is stopped. While the video is ended, also means it is stopped.- Returns:
- true if video is stopped or ended;
-
isEnded
public boolean isEnded()Returns whether the video is ended.- Returns:
- true if video is ended;
-