Class: Toybox.Media.ContentDelegate

Overview

A delegate object that the user implements to respond to certain media events from the native media player

Since:

API Level 3.0.0

Instance Method Summary collapse

Instance Method Details

getContentIterator() as Media.ContentIterator or Null

Return a ContentIterator object for the system to use to iterate over media tracks.

Returns:

Since:

API Level 3.0.0

onAdAction(adContext as Lang.Object) as Void

Respond to a user ad click.

Parameters:

  • adContext(Lang.Object)

    Context information for the ad that was clicked

Since:

API Level 3.0.0

onCustomButton(button as Media.CustomButton) as Void

Handle a CustomButton being selected in the Media Player

Parameters:

Since:

API Level 3.0.3

onRepeat() as Void

Respond to a command to change repeat mode

Since:

API Level 3.0.0

onShuffle() as Void

Respond to a command to turn shuffle on or off.

Since:

API Level 3.0.0

onSong(contentRefId as Lang.Object, songEvent as Media.SongEvent, playbackPosition as Lang.Number or Media.PlaybackPosition) as Void

Handle a notification from a system that a song has been played.

Parameters:

Since:

API Level 3.0.0

onThumbsDown(contentRefId as Lang.Object) as Void

Respond to a thumbs-down action.

The thumbs-down option is native to the device media player. When a user selects the thumbs-down function on the device, a corresponding onThumbsDown() event is sent to application.

Parameters:

Since:

API Level 3.0.0

onThumbsUp(contentRefId as Lang.Object) as Void

Respond to a thumbs-up action.

The thumbs-up option is native to the device media player. When a user selects the thumbs-up function on the device, a corresponding onThumbsUp() event is sent to the application.

Parameters:

Since:

API Level 3.0.0

resetContentIterator() as Media.ContentIterator or Null

Reset the ContentIterator to the beginning of the current playlist.

Returns:

Since:

API Level 3.0.0


Generated Dec 11, 2024, 8:58:43 AM