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


7533
7534
# File 'Monkeybrains.rb', line 7533

def getContentIterator()
end

onAdAction(adContext) ⇒ Object

Respond to a user ad click.

Parameters:

Since:

  • 3.0.0


7549
7550
# File 'Monkeybrains.rb', line 7549

def onAdAction(adContext)
end

onCustomButton(button) ⇒ Object

Handle a CustomButton being selected in the Media Player

Parameters:

Since:

  • 3.0.3


7592
7593
# File 'Monkeybrains.rb', line 7592

def onCustomButton(button)
end

onShuffleObject

Respond to a command to turn shuffle on or off.

Since:

  • 3.0.0


7576
7577
# File 'Monkeybrains.rb', line 7576

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


7586
7587
# File 'Monkeybrains.rb', line 7586

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


7571
7572
# File 'Monkeybrains.rb', line 7571

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


7560
7561
# File 'Monkeybrains.rb', line 7560

def onThumbsUp(contentRefId)
end

resetContentIteratorToybox::Media::ContentIterator

Reset the ContentIterator to the beginning of the current playlist.

Returns:

Since:

  • 3.0.0


7541
7542
# File 'Monkeybrains.rb', line 7541

def resetContentIterator()
end