Class: Toybox.Media.ContentIterator

Overview

A user-defined iterator that returns referenced to media content on the system for use by the system media player.

Since:

API Level 3.0.0

Instance Method Summary collapse

Instance Method Details

canSkip() as Lang.Boolean

Determine if the the current track can be skipped.

Returns:

  • Lang.Boolean

    Returns true if the current track can be skipped, otherwise false.

Since:

API Level 3.0.0

get() as Media.Content or Null

Get the current media content object.

Returns:

  • Media.Content
    • A Content object representing the current track

    • null if no tracks remain

    • An error object if an error has occurred. This can be anything that inherits from Object, but it must implement toString()

Since:

API Level 3.0.0

getPlaybackProfile() as Media.PlaybackProfile or Null

Get the current media content playback profile

Returns:

Since:

API Level 3.0.0

next() as Media.Content or Null

Get the next media content object.

Returns:

  • Media.Content
    • A Content object representing the next track

    • null if no tracks remain

    • An error object if an error occurred. This can be anything that inherits from Object, but it must implement toString().

Since:

API Level 3.0.0

peekNext() as Media.Content or Null

Get the next media content object without incrementing the iterator.

Returns:

  • Media.Content
    • A Content object representing the current track

    • null if no tracks remain

    • An error object if an error has occurred. This can be anything that inherits from Object, but it must implement toString()

Since:

API Level 3.0.0

peekPrevious() as Media.Content or Null

Get the previous media content object without decrementing the iterator.

Returns:

  • Media.Content
    • A Content object representing the current track

    • null if no tracks remain

    • An error object if an error has occurred. This can be anything that inherits from Object, but it must implement toString()

Since:

API Level 3.0.0

previous() as Media.Content or Null

Get the previous media content object.

Returns:

  • Media.Content
    • A Content object representing the next track.

    • null if no tracks remain.

    • An error object if an error occurred. This can be anything that inherits from Object, but it must implement toString().

Since:

API Level 3.0.0

repeatMode() as Media.RepeatMode or Null

Get the current repeat state

Returns:

Since:

API Level 3.0.0

shuffling() as Lang.Boolean

Determine if playback is currently set to shuffle.

Returns true if shuffle is on, otherwise false.

Returns:

Since:

API Level 3.0.0


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