Class IVideoController

java.lang.Object
org.zkoss.stateless.state.IVideoController

public class IVideoController extends Object
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
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the immutable audio instance that the controller to build with.
    boolean
    Returns whether the video is ended.
    boolean
    Returns whether the video is paused.
    boolean
    Returns whether the video is playing.
    boolean
    Returns whether the video is stopped.
    of(IVideo owner)
    Returns the controller instance with the given video
    void
    Pauses the video at the client.
    void
    Plays the video at the client.
    void
    setCurrentTime(double currentTime)
    Sets which part of video to play.
    void
    Stops the video at the client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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

      public static IVideoController of(IVideo owner)
      Returns the controller instance with the given video
      Parameters:
      owner - The controller to control with
    • build

      public IVideo 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;