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


8671
8672
# File 'Monkeybrains.rb', line 8671

def getContentIterator()
end

onAdAction(adContext) ⇒ Object

Respond to a user ad click.

Parameters:

Since:

  • 3.0.0


8687
8688
# File 'Monkeybrains.rb', line 8687

def onAdAction(adContext)
end

onCustomButton(button) ⇒ Object

Handle a CustomButton being selected in the Media Player

Parameters:

Since:

  • 3.0.3


8730
8731
# File 'Monkeybrains.rb', line 8730

def onCustomButton(button)
end

onShuffleObject

Respond to a command to turn shuffle on or off.

Since:

  • 3.0.0


8714
8715
# File 'Monkeybrains.rb', line 8714

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


8724
8725
# File 'Monkeybrains.rb', line 8724

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


8709
8710
# File 'Monkeybrains.rb', line 8709

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


8698
8699
# File 'Monkeybrains.rb', line 8698

def onThumbsUp(contentRefId)
end

resetContentIteratorToybox::Media::ContentIterator

Reset the ContentIterator to the beginning of the current playlist.

Returns:

Since:

  • 3.0.0


8679
8680
# File 'Monkeybrains.rb', line 8679

def resetContentIterator()
end