Contents

mediaItemWillChange

An event notifying the listener that the player is about to changed a media item.

Declaration

attribute  mediaItemWillChange;

Discussion

This attribute contains the reason the media item is about to change. Valid values are: errorDidOccur, fastForwardedToEndOfMediaItem, manuallyChanged, newPlaylist, playerInvalidated, and playedToEndOfMediaItem. The listener is passed an event object with the following attributes:

  • reason—An integer that represents the reason for why the media changed. Valid values are 0:Unknown, 1:Played to the end, 2:Forwarded to the end, 3:Error occurred, 4:Playlist changed, and 5:User initiated.

  • target—The event object, which is the Player object.

  • timeStamp—The time that the event occurred.

  • type—The name of the event.

See Also

Responding to Events