Contents

mediaItemDidChange

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

Declaration

attribute  mediaItemDidChange;

Discussion

This attribute contains the reason that the media item changed. 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