Class PlayerUIVideoEvent


public final class PlayerUIVideoEvent extends PlayerEvent
Called when the playback state of a UIVideo element changes on the client of a player, e.g when the video is prepared (loaded), started, ended or when an error occurred (unsupported format or unreachable URL). This event is not cancellable!
See Also:
  • Method Details

    • getUIElement

      public UIVideo getUIElement()
      Gets the video element this event belongs to.
      Returns:
      the video element.
    • getEventType

      public PlayerUIVideoEvent.Type getEventType()
      Gets the event type.
      Returns:
      the type of this event.
    • getTime

      public float getTime()
      Gets the playback position (in seconds) on the client when this event was sent. In multiplayer, please take the delay (ping) between client and server into account.
      Returns:
      the playback position in seconds at the time of the event.
    • getErrorMessage

      public String getErrorMessage()
      Gets the error message. Only available if the event type is PlayerUIVideoEvent.Type.Error.
      Returns:
      the error message, or null if this is not an error event.