Alexa Auto SDK  2.3.0
Classes | Public Member Functions | Static Public Attributes | List of all members
com.amazon.aace.alexa.AudioPlayer Class Reference

Classes

enum  PlayerActivity
 

Public Member Functions

void playerActivityChanged (PlayerActivity state)
 
final long getPlayerPosition ()
 
final long getPlayerDuration ()
 

Static Public Attributes

static final long TIME_UNKNOWN = -1
 

Detailed Description

AudioPlayer should be extended to handle audio output from the Engine.

Note
Audio playback control operations such as on-platform button presses must be routed through the PlaybackController.
See also
PlaybackController
TemplateRuntime.renderPlayerInfo()

Member Function Documentation

◆ playerActivityChanged()

void com.amazon.aace.alexa.AudioPlayer.playerActivityChanged ( PlayerActivity  state)

Notifies the platform implementation of a change in audio playback state

Parameters
stateThe new playback state

◆ getPlayerPosition()

final long com.amazon.aace.alexa.AudioPlayer.getPlayerPosition ( )

Returns the current playback position of the audio player. If the audio source is not playing, the most recent position played will be returned.

Returns
The audio player's playback position in milliseconds, or TIME_UNKNOWN if the current media position is unknown or invalid.

◆ getPlayerDuration()

final long com.amazon.aace.alexa.AudioPlayer.getPlayerDuration ( )

Returns the playback duration of the audio player.

Returns
The audio player's playback duration in milliseconds, or TIME_UNKNOWN if the current media position is unknown or invalid.

Member Data Documentation

◆ TIME_UNKNOWN

final long com.amazon.aace.alexa.AudioPlayer.TIME_UNKNOWN = -1
static

Used when audio time is unknown or indeterminate.


Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0