Package com.iizix.api.ui
Class UIMediaEvent
- All Implemented Interfaces:
- IMessageBox
The UI Media Event is fired when the Media component for Audio or Video issues an event.} enum:
The following events are fired, and are defined in the
invalid @link
{@link @Type- loadstart
- progress
- suspend
- abort
- error
- emptied
- stalled
- loadedmetadata
- loadeddata
- canplay
- canplaythrough
- playing
- waiting
- seeking
- seeked
- ended
- durationchange
- timeupdate
- play
- pause
- ratechange
- resize
- volumechange
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- static classClass for a TimeRange.- static classClass for a TimeRanges value, used for "buffered" and "played" time ranges.- static enumEnum for event type.- Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox- IMessageBox.Icon
- Field SummaryFieldsModifier and TypeFieldDescription- static final intReady state value (=2): data for the current playback position is available, but not enough data to play next frame/millisecond.- static final intReady state value (=4): enough data available to start playing.- static final intReady state value (=3): data for the current and at least the next frame/milliseconds is available.- static final intReady state value (=1): metadata for the audio/video is ready.- static final intRead state value (=0): no information whether or not the audio/video is ready.- static final intNetwork state value (=0): audio/video has not yet been initialized.- static final intNetwork state value (=1): audio/video is active and has selected a resource, but is not using the network.- static final intNetwork state value (=2): downloading data.- static final intNetwork state value (=3): no audio/video source found.- Fields inherited from interface com.iizix.gyro.IMessageBox- ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
- Constructor SummaryConstructorsConstructorDescription- UIMediaEvent- (UIMedia source, PropCnr params) Constructs the event for a change without a trigger source.
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two objects are equal.- booleanGets the autoplay flag for the media player.Gets the buffered TimeRanges.Gets the current source URL assigned to the media player.- doubleGets the current time of the media player.- doubleGets the duration of the media in seconds.Gets the event error in case of API error.- intGets the network state of the media player.Gets the played TimeRanges.- booleanGets the preload flag for the media player.- intGets the ready state of the media player.Gets the UI media component that is the source of the event.- getType()Gets the event type.- intGets the height of the video.- intGets the width of the video.- doubleGets the volume between 0 and 1.- booleanGets if the media player has controls displayed or not.- int- hashCode()Returns a hash code value for the object.- boolean- isMuted()Gets the muted media flag.- boolean- isPaused()Gets the paused media flag.- booleanGets the media seeking flag.- protected StringReturns the paramString.- Methods inherited from class com.iizix.api.ui.UIBaseEvent- getAppSessionGyro, getClientSessionGyro, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getFirstUIComponent, getFirstUIComponentNull, getPanelUIComponent, getPanelUIComponentNull, getUIPanel, getVirtualSpace- Methods inherited from class com.iizix.api.BaseEvent- getAction, getAction2, getActionNull, getActionNull2, getField, getField2, getFieldNull, getFieldNull2, getGroup, getGroup2, getGroupNull, getGroupNull2, getTable, getTable2, getTableNull, getTableNull2, getTime, getVirtualizedVirtualSpace, getVSComponent, getVSComponent2, getVSComponentNull, getVSComponentNull2, messageBox, toString- Methods inherited from class java.lang.Object- clone, finalize, getClass, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.gyro.IMessageBox- messageBox, messageBox, messageBox
- Field Details- HAVE_NOTHINGpublic static final int HAVE_NOTHINGRead state value (=0): no information whether or not the audio/video is ready.- See Also:
 
- HAVE_METADATApublic static final int HAVE_METADATAReady state value (=1): metadata for the audio/video is ready.- See Also:
 
- HAVE_CURRENT_DATApublic static final int HAVE_CURRENT_DATAReady state value (=2): data for the current playback position is available, but not enough data to play next frame/millisecond.- See Also:
 
- HAVE_FUTURE_DATApublic static final int HAVE_FUTURE_DATAReady state value (=3): data for the current and at least the next frame/milliseconds is available.- See Also:
 
- HAVE_ENOUGH_DATApublic static final int HAVE_ENOUGH_DATAReady state value (=4): enough data available to start playing.- See Also:
 
- NETWORK_EMPTYpublic static final int NETWORK_EMPTYNetwork state value (=0): audio/video has not yet been initialized.- See Also:
 
- NETWORK_IDLEpublic static final int NETWORK_IDLENetwork state value (=1): audio/video is active and has selected a resource, but is not using the network.- See Also:
 
- NETWORK_LOADINGpublic static final int NETWORK_LOADINGNetwork state value (=2): downloading data.- See Also:
 
- NETWORK_NO_SOURCEpublic static final int NETWORK_NO_SOURCENetwork state value (=3): no audio/video source found.- See Also:
 
 
- Constructor Details- UIMediaEventConstructs the event for a change without a trigger source.- Parameters:
- source- The source media UI component.
- params- The property container with event details.
- Throws:
- NullPointerException- If the source or params is null.
 
 
- Method Details- getTypeGets the event type.- Returns:
- The media event type, or nullif not a listener event, but rather an event induced by the remote player to the server in response to a remote request.
 
- getSourceGets the UI media component that is the source of the event.
- getEventErrorGets the event error in case of API error. Do not confuse this with the UI media component 'error' state.- Returns:
- The event error, of nullfor none.
 
- getVolumepublic double getVolume()Gets the volume between 0 and 1.- Returns:
- The volume, or -1d for none.
 
- getDurationpublic double getDuration()Gets the duration of the media in seconds.- Returns:
- The duration, or -1d for none.
 
- getCurrentTimepublic double getCurrentTime()Gets the current time of the media player.- Returns:
- The current time in seconds, or -1d for none.
 
- isPausedpublic boolean isPaused()Gets the paused media flag.- Returns:
- The paused flag.
 
- isMutedpublic boolean isMuted()Gets the muted media flag.- Returns:
- The muted flag.
 
- isSeekingpublic boolean isSeeking()Gets the media seeking flag.- Returns:
- The seeking flag.
 
- getReadyStatepublic int getReadyState()Gets the ready state of the media player.- The values returned are: - HAVE_NOTHING= 0: no information whether or not the audio/video is ready.
- HAVE_METADATA= 1: metadata for the audio/video is ready.
- HAVE_CURRENT_DATA= 2: data for the current playback position is available, but not enough data to play next frame/millisecond.
- HAVE_FUTURE_DATA= 3: data for the current and at least the next frame/milliseconds is available.
- HAVE_ENOUGH_DATA= 4: enough data available to start playing.
 - Typically, this value is changed upon the events - UIMediaEvent.Type:- playing
- waiting
- ended
- emptied
- stalled
 - Returns:
- The ready state, or zero for none.
 
- getNetworkStatepublic int getNetworkState()Gets the network state of the media player.- The values returned are: - NETWORK_EMPTY= 0: audio/video has not yet been initialized.
- NETWORK_IDLE= 1: audio/video is active and has selected a resource, but is not using the network.
- NETWORK_LOADING= 2: downloading data.
- NETWORK_NO_SOURCE= 3: no audio/video source found.
 - Typically, this value is changed upon the events - UIMediaEvent.Type:- playing
- waiting
- ended
- emptied
- stalled
 - Returns:
- The network state.
 
- hasControlspublic boolean hasControls()Gets if the media player has controls displayed or not.- Returns:
- The controls usage flag.
 
- getAutoPlaypublic boolean getAutoPlay()Gets the autoplay flag for the media player.- Returns:
- The autoplay flag.
 
- getPreLoadpublic boolean getPreLoad()Gets the preload flag for the media player.- Returns:
- The preload flag.
 
- getCurrentSourceGets the current source URL assigned to the media player.- Returns:
- The URL or empty string for none.
 
- getVideoWidthpublic int getVideoWidth()Gets the width of the video.- Returns:
- The width, or zero for none.
 
- getVideoHeightpublic int getVideoHeight()Gets the height of the video.- Returns:
- The height, or zero for none.
 
- getBufferedGets the buffered TimeRanges.- Returns:
- The time ranges instance, or nullfor none.
 
- getPlayedGets the played TimeRanges.- Returns:
- The time ranges instance, or nullfor none.
 
- equalsChecks if two objects are equal.
- hashCodepublic int hashCode()Returns a hash code value for the object.
- paramStringReturns the paramString.- Overrides:
- paramStringin class- BaseEvent<UIMedia>