Class: Toybox::Media::ContentDelegate

Inherits:
Lang::Object show all

Overview

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

Since:

  • 3.0.0

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Method Details

getContentIteratorToybox::Media::ContentIterator

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

Returns:

Since:

  • 3.0.0


8674
8675
# File 'Monkeybrains.rb', line 8674

def getContentIterator()
end

onAdAction(adContext) ⇒ Object

Respond to a user ad click.

Parameters:

Since:

  • 3.0.0


8690
8691
# File 'Monkeybrains.rb', line 8690

def onAdAction(adContext)
end

onCustomButton(button) ⇒ Object

Handle a CustomButton being selected in the Media Player

Parameters:

Since:

  • 3.0.3


8733
8734
# File 'Monkeybrains.rb', line 8733

def onCustomButton(button)
end

onShuffleObject

Respond to a command to turn shuffle on or off.

Since:

  • 3.0.0


8717
8718
# File 'Monkeybrains.rb', line 8717

def onShuffle()
end

onSong(contentRefId, songEvent, playbackPosition) ⇒ Object

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

Parameters:

Since:

  • 3.0.0


8727
8728
# File 'Monkeybrains.rb', line 8727

def onSong(contentRefId, songEvent, playbackPosition)
end

onThumbsDown(contentRefId) ⇒ Object

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:

  • 3.0.0


8712
8713
# File 'Monkeybrains.rb', line 8712

def onThumbsDown(contentRefId)
end

onThumbsUp(contentRefId) ⇒ Object

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:

  • 3.0.0


8701
8702
# File 'Monkeybrains.rb', line 8701

def onThumbsUp(contentRefId)
end

resetContentIteratorToybox::Media::ContentIterator

Reset the ContentIterator to the beginning of the current playlist.

Returns:

Since:

  • 3.0.0


8682
8683
# File 'Monkeybrains.rb', line 8682

def resetContentIterator()
end