Class PlayerUIVideoEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.ui.PlayerUIVideoEvent
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:
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the error message.Gets the event type.floatgetTime()Gets the playback position (in seconds) on the client when this event was sent.Gets the video element this event belongs to.Methods inherited from class PlayerEvent
getPlayer
-
Method Details
-
getUIElement
Gets the video element this event belongs to.- Returns:
- the video element.
-
getEventType
-
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
Gets the error message. Only available if the event type isPlayerUIVideoEvent.Type.Error.- Returns:
- the error message, or null if this is not an error event.
-