Player API State Events

This article sums up the different Player API state events


Player API State Events:

  • firstPlay

    Triggered once per content entry when first played. If user initiates a replay this is a new content playback sequence and will triger firstPlay again.

  • firstQuartile

    The player reached 25% of the entry playback

  • secondQuartile

    The player reached 50% of the entry playback

  • thirdQuartile

    The player reached 75% of the entry playback

  • playerPlayEnd

    The played media has reached the end of content playback.

    Callback Args:

    None

  • durationChange

    Notify a change in the playing entry duration

    Callback Args:

    New duration value

  • rootResize

    The player parent was resized

    Callback Args:

    width: new width, height: new height

    Legacy Only

  • mediaViewableChange

    Used mainly to know when OSMF Media Player is viewable

    Callback Args:

    None

    Legacy Only

  • playerStateChange

    Dispatched when media player's state has changed (OSMF MediaPlayerState: uninitialized / loading / ready / playing / paused / buffering / playbackError

    Callback Args:

    The new state (MediaPlayerState)

  • playerPaused

    The player is now in pause state

    Callback Args:

    None

  • playerPlayed

    Triggered when the player enters a play state. This event be triggered multiple times during a single playback session. For example, playerPlayed will be triggered between ads and when the user plays content after pausing it.

    Callback Args:

    None

  • userInitiatedPlay

    Triggered when the player enters a play state due to user action. For example, when user clicked the play button.

    Callback Args:

    None

  • userInitiatedPause

    Triggered when the player enters a pause state due to user action. For example, when user clicked the pause button.

    Callback Args:

    None

  • preSeek

    Notify about a seek activity that is about to start

    Callback Args:

    seekTime: The target time to seek to

  • seek

    Notify about a seek activity that started

    Callback Args:

    currentTime: The player current time when the seek operation starts

  • seeked

    Notify that the seek activity has finished

    Callback Args:

    seekedTime: The time that the player actually seeked to

  • userInitiatedSeek

    Triggered when the player performs a seek operation due to user action. For example, when user moves the scrubber head or clicks the scrubber track.

    Callback Args:

    None

  • monitorEvent

    Triggers few times a second while the player plays. Used to update the play head and for sync tasks. The exact event interval is defined by the EmbedPlayer.MonitorRate Flashvar.

    Callback Args:

    None

  • playerUpdatePlayhead

    An update event that notifies about the progress in time when playback is running

    Callback Args:

    Player current time

  • openFullScreen

    Player entered full screen mode

    Callback Args:

    None

  • closeFullScreen

    Player exited from full screen mode

    Callback Args:

    None

  • hasCloseFullScreen

    The fullscreen has just closed

    Callback Args:

    None

  • hasOpenedFullScreen

    The fullscreen was just activated

    Callback Args:

    None

  • volumeChanged

    Notification about a change in the player volume

    Callback Args:

    New volume value

  • volumeChangedEnd

    Notification fired when volumeChanged process ended (volume slider thumb release / volume button click). Saves value to cookie if possible

    Callback Args:

    New volume value

    Legacy Only

  • mute

    Notification fired when the player is muted

    Callback Args:

    None

  • unmute

    Notification fired when the player is unmuted

    Callback Args:

    None

  • bytesDownloadedChange

    Notify the current and the previous value of bytesDownloaded

    Callback Args:

    newValue: bytes loaded

  • bytesTotalChange

    Dispatched by the player when the value of the property 'bytesTotal' has changed

    Callback Args:

    newValue: total bytes

  • bufferProgress

    The player dispatches this event when the buffer time has changed

    Callback Args:

    newTime: new buffer time

  • bufferChange

    Dispatches when the player starts or stops buffering

    Callback Args:

    true / false

  • bufferStartEvent

    Dispatches when the player starts buffering

  • bufferEndEvent

    Dispatches when the player starts buffering

    Callback Args:

    bufferTime: The amount of time since last buffer start event.

  • scrubberDragStart

    The scrubber had started being dragged

    Callback Args:

    None

    Legacy Only

  • scrubberDragEnd

    The scrubber had stopped being dragged

    Callback Args:

    None

    Legacy Only

  • intelliSeek

    Notification fired when the player has started intelligent seeking

    Callback Args:

    intelliseekTo: new position to seek to

    Legacy Only

  • freePreviewEnd

    A notification that is called on the hosting page with content that should be purchased after a short preview

    Callback Args:

    id of the viewed entry

  • changeMediaProcessStarted

    Notification fired when the first mini-command of the ChangeMedia macro command has started

    Callback Args:

    entryId: The new entry ID

    Legacy Only

  • metadataReceived

    Notification fired when entry custom data was received

    Callback Args:

    None

  • cuePointsReceived

    Notification fired when the player has successfully loaded an entry's cue-point configuration

    Callback Args:

    Cue Points Map. Object mapping between start-times and arrays of the cue points found on that start-time

  • cuePointReached

    Notification fired when the player reaches a cuePoint

    Callback Args:

    Current cuePoint object. Return Object with context and a cuePoint object

  • switchingChangeStarted

    Notification dispatched when the player has started switching to a different dynamic bitrate

    Callback Args:

    newIndex: The index of the bitrate the player started switching to. If auto, send -1, newBitrate: The bitrate the player started switching to. If auto, send null

  • switchingChangeComplete

    Notification dispatched when the player has finished switching to a different dynamic bitrate

    Callback Args:

    currentIndex: The index of the bitrate that the player finished switching to, currentBitrate: The bitrate the player finished switching to

  • playbackComplete

    Signifies the end of a media in the player (can be either ad or content)

    Callback Args:

    None

  • closedCaptionsHidden

    Notification dispatched when captions are hidden

    Callback Args:

    None

  • closedCaptionsDisplayed

    Notification dispatched when captions are displayed

    Callback Args:

    language: the selected language

  • changedClosedCaptions

    Notification dispatched when captions language is changed

    Callback Args:

    language: the new selected language

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us