Class AbstractEvent<PropertyValueType>

java.lang.Object
com.brightcove.player.event.AbstractEvent<PropertyValueType>
Direct Known Subclasses:
Event, MediaEvent

public abstract class AbstractEvent<PropertyValueType> extends Object
  • Field Details

    • CONFIGURATION

      public static final String CONFIGURATION
      Key for Events that carry a configuration in their payload.
      See Also:
    • CUE_POINT

      public static final String CUE_POINT
      Key for Events that carry a single Cue Point.
      See Also:
    • CUE_POINTS

      public static final String CUE_POINTS
      Key for Events that carry a list of Cue Points.
      See Also:
    • PLAYLIST

      public static final String PLAYLIST
      Video for Events that carry a single Playlist.
      See Also:
    • VIDEO

      public static final String VIDEO
      Video for Events that carry a single Video.
      See Also:
    • SOURCE

      public static final String SOURCE
      Source for Events that carry a single Source.
      See Also:
    • CURRENT_VIDEO

      public static final String CURRENT_VIDEO
      Video for Events that carry a current Video.
      See Also:
    • NEXT_VIDEO

      public static final String NEXT_VIDEO
      Video for Events that carry a next Video.
      See Also:
    • INDEX

      public static final String INDEX
      Video for Events that carry a video index.
      See Also:
    • VIDEO_STILL

      public static final String VIDEO_STILL
      URL for Events that carry a Video still image URL.
      See Also:
    • FROM_SEEK_POSITION

      @Deprecated public static final String FROM_SEEK_POSITION
      Deprecated.
      Position from which a seek began.
      See Also:
    • FROM_SEEK_POSITION_LONG

      public static final String FROM_SEEK_POSITION_LONG
      Position from which a seek began. This is used to reference long values
      See Also:
    • SEEK_POSITION

      @Deprecated public static final String SEEK_POSITION
      Deprecated.
      Position to which a seek action brings the playhead.
      See Also:
    • SEEK_POSITION_LONG

      public static final String SEEK_POSITION_LONG
      Position to which a seek action brings the playhead. This is used to reference long values
      See Also:
    • RESTORE_SEEK_POSITION

      @Deprecated public static final String RESTORE_SEEK_POSITION
      Deprecated.
      Position to which a seek action brings the playhead, after the player has been restored.
      See Also:
    • RESTORE_SEEK_POSITION_LONG

      public static final String RESTORE_SEEK_POSITION_LONG
      Position to which a seek action brings the playhead, after the player has been restored. This is used to reference long values
      See Also:
    • ORIGINAL_SEEK_POSITION

      @Deprecated public static final String ORIGINAL_SEEK_POSITION
      Deprecated.
      The unmapped seek position. Used by the OnceUX plugin.
      See Also:
    • ORIGINAL_SEEK_POSITION_LONG

      public static final String ORIGINAL_SEEK_POSITION_LONG
      The unmapped seek position. Used by the OnceUX plugin. This is used to reference long values
      See Also:
    • PLAYHEAD_POSITION

      @Deprecated public static final String PLAYHEAD_POSITION
      Deprecated.
      Current playhead position in milliseconds.
      See Also:
    • PLAYHEAD_POSITION_LONG

      public static final String PLAYHEAD_POSITION_LONG
      Current playhead position in milliseconds. This is used to reference long values
      See Also:
    • VIDEO_DURATION

      @Deprecated public static final String VIDEO_DURATION
      Deprecated.
      The video's duration in milliseconds.
      See Also:
    • VIDEO_DURATION_LONG

      public static final String VIDEO_DURATION_LONG
      The video's duration in milliseconds. This is used to reference long values
      See Also:
    • SEGMENT_DURATION

      public static final String SEGMENT_DURATION
      The video segment's duration in milliseconds.
      See Also:
    • MAX_POSITION

      @Deprecated public static final String MAX_POSITION
      Deprecated.
      The maximum position for which a seek will be successful.
      See Also:
    • MAX_POSITION_LONG

      public static final String MAX_POSITION_LONG
      The maximum position for which a seek will be successful.
      See Also:
    • MIN_POSITION

      @Deprecated public static final String MIN_POSITION
      Deprecated.
      The minimum position for which a seek will be successful.
      See Also:
    • MIN_POSITION_LONG

      public static final String MIN_POSITION_LONG
      The minimum position for which a seek will be successful.
      See Also:
    • LIVE_WINDOW_DURATION

      @Deprecated public static final String LIVE_WINDOW_DURATION
      Deprecated.
      The absolute playable window duration for a live video.
      See Also:
    • LIVE_WINDOW_DURATION_LONG

      public static final String LIVE_WINDOW_DURATION_LONG
      The absolute playable window duration for a live video.
      See Also:
    • PERCENT_COMPLETE

      public static final String PERCENT_COMPLETE
      Percentage of the video that has buffered so far.
      See Also:
    • ERROR_MESSAGE

      public static final String ERROR_MESSAGE
      Used to transmit an error message when an error occurs
      See Also:
    • ERROR_CODE

      public static final String ERROR_CODE
      Key for the error code sent for a non-playable source
      See Also:
    • ERROR_SUBCODE

      public static final String ERROR_SUBCODE
      Key for the error subcode sent for a non-playable source
      See Also:
    • ERROR_EXTRA

      public static final String ERROR_EXTRA
      Key for the extra code sent during an error for non-playable source
      See Also:
    • ERROR

      public static final String ERROR
      Key for an actual exception associated with a playback error
      See Also:
    • ERRORS

      public static final String ERRORS
      Key for list of error messages in a response.
      See Also:
    • VIDEO_WIDTH

      public static final String VIDEO_WIDTH
      Width of video. Used for VIDEO_SIZE_KNOWN.
      See Also:
    • VIDEO_HEIGHT

      public static final String VIDEO_HEIGHT
      Height of video. Used for VIDEO_SIZE_KNOWN.
      See Also:
    • REQUEST_TOKEN

      public static final String REQUEST_TOKEN
      Used by the Request/Response setup; marks the id of the listener to get the response.
      See Also:
    • DEBUG

      public static final String DEBUG
      Whether components should emit additional debug information.
      See Also:
    • EMITTER

      public static final String EMITTER
      The simple name of the source component for an event when running in debug mode
      See Also:
    • ORIGINAL_EVENT

      public static final String ORIGINAL_EVENT
      Original event used in situations where default behavior is prevented and the original event needs to be re-emitted.
      See Also:
    • EVENT_SOURCE

      public static final String EVENT_SOURCE
      Property that specifies the source class where the event originated.
      See Also:
    • LIST

      public static final String LIST
      The name of the property for video list.
      See Also:
    • UUID

      public static final String UUID
      The property name of the universally unique identifier.
      See Also:
    • ID

      public static final String ID
      The property name of the unique identifier.
      See Also:
    • START_TIME

      @Deprecated public static final String START_TIME
      Deprecated.
      The beginning of the time range of a list of cue points
      See Also:
    • START_TIME_LONG

      public static final String START_TIME_LONG
      The beginning of the time range of a list of cue points
      See Also:
    • END_TIME

      @Deprecated public static final String END_TIME
      Deprecated.
      The end of the time range of a list of cue points
      See Also:
    • END_TIME_LONG

      public static final String END_TIME_LONG
      The end of the time range of a list of cue points
      See Also:
    • SKIP_CUE_POINTS

      public static final String SKIP_CUE_POINTS
      When added as a key to PLAY/SEEK/VIDEO_COMPLETED events, cue points will be skipped
      See Also:
    • PLUGIN_NAME

      public static final String PLUGIN_NAME
      The name of a plugin registered to the SDK.
      See Also:
    • LEFT_VOLUME

      public static final String LEFT_VOLUME
      The setting of the left channel volume for a player (as float: 0.0f-1.0f inclusive).
      See Also:
    • RIGHT_VOLUME

      public static final String RIGHT_VOLUME
      The setting of the right channel volume for a player (as float: 0.0f-1.0f inclusive).
      See Also:
    • VOLUME

      public static final String VOLUME
      The single setting volume for a player that doesn't use channels. (as float: 0.0f-1.0f inclusive).
      See Also:
    • SEEK_CONTROLS_VISIBILITY

      public static final String SEEK_CONTROLS_VISIBILITY
      The key for accessing a visibility map associating seek controls with visibility state from the event properties.
      See Also:
    • SEEK_PROGRESS

      @Deprecated public static final String SEEK_PROGRESS
      Deprecated.
      The setting that has the amount of time (milliseconds) where the seek indicator must be positioned.
      See Also:
    • SEEK_PROGRESS_LONG

      public static final String SEEK_PROGRESS_LONG
      The setting that has the amount of time (milliseconds) where the seek indicator must be positioned.
      See Also:
    • SEEK_DEFAULT

      @Deprecated public static final String SEEK_DEFAULT
      Deprecated.
      The setting for the default seek time.
      See Also:
    • SEEK_DEFAULT_LONG

      public static final String SEEK_DEFAULT_LONG
      The setting for the default seek time.
      See Also:
    • SEEK_RELATIVE_ENABLED

      public static final String SEEK_RELATIVE_ENABLED
      The setting to enable to seek relatively to the video duration and not by a fixed time.
      See Also:
    • SEEK_PERCENTAGE

      public static final String SEEK_PERCENTAGE
      The setting used if the seek relative is enabled. Is used to calculate the see time for each video duration.
      See Also:
    • SEEK_ON_HOLD_WAIT_TIME

      public static final String SEEK_ON_HOLD_WAIT_TIME
      The setting to determine when the rewind or fast-forward buttons are been long-pressed and held.
      See Also:
    • SEEK_ON_HOLD_UPDATE_FREQ

      public static final String SEEK_ON_HOLD_UPDATE_FREQ
      The setting to determine the speed we're seeking when holding down either the rewind or fast-forward button.
      See Also:
    • BUILD_VERSION

      public static final String BUILD_VERSION
      See Also:
    • INSTANCE_STATE

      public static final String INSTANCE_STATE
      The key for saving and restoring instance state on a lifecycle event. Provides access to the Bundle object in which state is saved or from which state is restored.
      See Also:
    • ACTIVITY

      public static final String ACTIVITY
      The key for Activity on the FRAGMENT_ATTACHED lifecycle event.
      See Also:
    • FRAGMENT

      public static final String FRAGMENT
      The key for the Fragment object on FRAGMENT_ACTIVITY_CREATED event.
      See Also:
    • SUPPORT_FRAGMENT

      public static final String SUPPORT_FRAGMENT
      The key for the Support Fragment object on FRAGMENT_ACTIVITY_CREATED event.
      See Also:
    • BOOLEAN

      public static final String BOOLEAN
      The key for a general boolean property.
      See Also:
    • TTML_DOCUMENT

      public static final String TTML_DOCUMENT
      The key for events carrying DFXP/TTML data.
      See Also:
    • WEBVTT_DOCUMENT

      public static final String WEBVTT_DOCUMENT
      The key for events carrying WebVTT data.
      See Also:
    • VALUE

      public static final String VALUE
      See Also:
    • CEA608_DOCUMENT

      public static final String CEA608_DOCUMENT
      The key for events carrying CEA-608 data.
      See Also:
    • CEA708_DOCUMENT

      public static final String CEA708_DOCUMENT
      The key for events carrying CEA-708 data.
      See Also:
    • LOCALE_CODE

      public static final String LOCALE_CODE
      The key for events carrying a locale code for subtitle tracks.
      See Also:
    • CAPTION_FORMAT

      public static final String CAPTION_FORMAT
      The key containing the BrightcoveCaptionFormat selected.
      See Also:
    • CAPTION_URI

      public static final String CAPTION_URI
      The key containing the uri for the BrightcoveCaptionFormat selected.
      See Also:
    • ALIGNMENT

      public static final String ALIGNMENT
      The alignment property of a CAPTION event.
      See Also:
    • LINE

      public static final String LINE
      The line property of a CAPTION event.
      See Also:
    • LINE_TYPE

      public static final String LINE_TYPE
      The line type property of a CAPTION event.
      See Also:
    • LINE_ANCHOR

      public static final String LINE_ANCHOR
      The line anchor property of a CAPTION event.
      See Also:
    • SIZE

      public static final String SIZE
      The SIZE property of a CAPTION event.
      See Also:
    • POSITION

      public static final String POSITION
      The position property of a CAPTION event.
      See Also:
    • POSITION_ANCHOR

      public static final String POSITION_ANCHOR
      The position anchor property of a CAPTION event.
      See Also:
    • TEXT

      public static final String TEXT
      The text property of a CAPTION event.
      See Also:
    • CAPTIONS_STATE

      public static final String CAPTIONS_STATE
      The key for events accessing caption state. Saved and restored for configuration change or Activity restart.
      See Also:
    • LANGUAGES

      public static final String LANGUAGES
      The key for the list of languages in CAPTIONS_LANGUAGES events.
      See Also:
    • AUDIO_TRACKS_STATE

      public static final String AUDIO_TRACKS_STATE
      The key for events accessing audio tracks state. Saved and restored for configuration change or Activity restart..
      See Also:
    • PICTURE_IN_PICTURE_STATE

      public static final String PICTURE_IN_PICTURE_STATE
      The key for events accessing Picture-in-Picture state. Saved and restored for configuration change or Activity restart.
      See Also:
    • TRACKS

      public static final String TRACKS
      The key for the list of tracks in AUDIO_TRACKS events.
      See Also:
    • SELECTED_TRACK

      public static final String SELECTED_TRACK
      The key for the selected track in AUDIO_TRACKS and SELECT_AUDIO_TRACK events.
      See Also:
    • AUDIO_VARIANT

      public static final String AUDIO_VARIANT
      The key for the list of audio variants in AUDIO_TRACKS events.
      See Also:
    • ORIGINAL_PLAYHEAD_POSITION

      @Deprecated public static final String ORIGINAL_PLAYHEAD_POSITION
      Deprecated.
      The unmapped current playhead position. Used by the OnceUX plugin and the BrightcoveClosedCaptioningView.
      See Also:
    • ORIGINAL_PLAYHEAD_POSITION_LONG

      public static final String ORIGINAL_PLAYHEAD_POSITION_LONG
      The unmapped current playhead position. Used by the OnceUX plugin and the BrightcoveClosedCaptioningView. This is used to reference long values
      See Also:
    • PROGRESS_BAR_PLAYHEAD_POSITION

      @Deprecated public static final String PROGRESS_BAR_PLAYHEAD_POSITION
      Deprecated.
      Current playhead position in milliseconds, as shown in the Progress Bar.
      See Also:
    • PROGRESS_BAR_PLAYHEAD_POSITION_LONG

      public static final String PROGRESS_BAR_PLAYHEAD_POSITION_LONG
      Current playhead position in milliseconds, as shown in the Progress Bar. This is used to reference long values
      See Also:
    • CATALOG_URL

      public static final String CATALOG_URL
      The key for catalog urls used in the Analytics catalog request and response events.
      See Also:
    • RENDITION_URL

      public static final String RENDITION_URL
      The key for rendition urls used in the Analytics class.
      See Also:
    • RENDITION_INDICATED_BPS

      public static final String RENDITION_INDICATED_BPS
      The key for rendition indicated bps used in the Analytics class.
      See Also:
    • RENDITION_MIME_TYPE

      public static final String RENDITION_MIME_TYPE
      The key for rendition mime type used in the Analytics class.
      See Also:
    • RENDITION_HEIGHT

      public static final String RENDITION_HEIGHT
      The key for rendition height used in the Analytics class.
      See Also:
    • RENDITION_WIDTH

      public static final String RENDITION_WIDTH
      The key for rendition width used in the Analytics class.
      See Also:
    • FORWARD_BUFFER_SECONDS

      public static final String FORWARD_BUFFER_SECONDS
      The key for forward buffer seconds used in the Analytics class.
      See Also:
    • MEASURED_BPS

      public static final String MEASURED_BPS
      The key for measured bps used in the Analytics class.
      See Also:
    • MEDIA_BYTES_TRANSFERRED

      public static final String MEDIA_BYTES_TRANSFERRED
      The key for total number of bytes transferred by the video player.
      See Also:
    • RESPONSE_TIME_MS

      public static final String RESPONSE_TIME_MS
      The key for response times in milliseconds used in the Analytics catalog response events.
      See Also:
    • AD_ID

      public static final String AD_ID
      The key for ad id used in advertising events.
      See Also:
    • AD_TITLE

      public static final String AD_TITLE
      The key for ad title used in advertising events.
      See Also:
    • PROJECTION_FORMAT

      public static final String PROJECTION_FORMAT
      The key for the projection format sent in the Event EventType.PROJECTION_FORMAT_CHANGED.
      See Also:
    • REQUESTED_ORIENTATION

      public static final String REQUESTED_ORIENTATION
      The key for the orientation type sent in the Event EventType.CHANGE_ORIENTATION.
      See Also:
    • PLAYBACK_LOCATION

      public static final String PLAYBACK_LOCATION
      The event property key that specifies the PlaybackLocation. Currently used when using the Cast plugin.
      See Also:
    • MEDIA_CONTROLLER_CONFIG

      public static final String MEDIA_CONTROLLER_CONFIG
      See Also:
    • BRIGHTCOVE_CONTROL_BAR

      public static final String BRIGHTCOVE_CONTROL_BAR
      The event property that specifies the BrightcoveControlBar.
      See Also:
    • BRIGHTCOVE_MEDIA_CONTROLLER

      public static final String BRIGHTCOVE_MEDIA_CONTROLLER
      The event property that specifies the BrightcoveMediaController.
      See Also:
    • ANDROID_VIEW

      public static final String ANDROID_VIEW
      The event property that specifies View.
      See Also:
    • GSC_MAX_CONCURRENCY_REACHED_MESSAGE

      public static final String GSC_MAX_CONCURRENCY_REACHED_MESSAGE
      Key for the max concurrency reached message
      See Also:
    • GSC_HEARTBEAT_STOPPED_MESSAGE

      public static final String GSC_HEARTBEAT_STOPPED_MESSAGE
      Key for the heartbeat stopped message
      See Also:
    • AD_INSIGHTS

      public static final String AD_INSIGHTS
      Key for the Ad Insights parameters map
      See Also:
    • SEND_VIDEO_RESUMED_ANALYTICS

      public static final String SEND_VIDEO_RESUMED_ANALYTICS
      Key for the conditional delivery of the analytics video_resumed.
      See Also:
    • type

      protected final String type
    • isStopped

      protected boolean isStopped
    • isPrevented

      protected boolean isPrevented
  • Constructor Details

    • AbstractEvent

      public AbstractEvent(@NonNull String type)
  • Method Details

    • getNextId

      public static int getNextId()
      Returns:
      The next unique id.
    • getId

      public int getId()
      Returns:
      The unique id.
    • getType

      public String getType()
      The event type, typically specified from a constant value defined in EventType.
      Returns:
      the String indicating the type of Event
    • preventDefault

      public void preventDefault()
      Causes the Event handling framework to not execute any default behavior that may be defined for a given Event.
    • stopPropagation

      public void stopPropagation()
      Causes the Event handling framework to stop processing any additional Events.
    • isPrevented

      public boolean isPrevented()
      Indicates that a participant of the current Event activity has prevented the default behavior for the current Event.
      Returns:
      true if the default behavior has been prevented
    • isStopped

      public boolean isStopped()
      Indicates that a participant of the current Event activity has stopped the processing of any additional Events.
      Returns:
      true if Event processing was stopped
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProperty

      @Nullable public PropertyValueType getProperty(@NonNull String propertyName)
    • getProperty

      public <T> T getProperty(String eventPropertyId, Class<T> type)
      Returns the casted value of the eventPropertyId.
      Type Parameters:
      T - the expected type.
      Parameters:
      eventPropertyId - the id of the property to retrieve.
      type - the class to be casted.
      Returns:
      the casted value of the eventPropertyId.
    • getIntegerProperty

      public int getIntegerProperty(@NonNull String propertyName)
      Convenience method for accessing a property with an integer value
      Parameters:
      propertyName - Name of property to access
      Returns:
      value of the integer, will be -1 if not found or error
    • getLongProperty

      public long getLongProperty(@NonNull String propertyName)
      Convenience method for accessing a property with an long value
      Parameters:
      propertyName - Name of property to access
      Returns:
      value of the long, will be -1 if not found or error
    • getProperties

      @NonNull public abstract Map<String,PropertyValueType> getProperties()