Alexa Auto SDK  2.3.1
Public Types | Public Member Functions | Static Public Attributes | List of all members
aace::alexa::AudioPlayer Class Reference

Public Types

using PlayerActivity = aace::alexa::PlayerActivity
 

Public Member Functions

virtual void playerActivityChanged (PlayerActivity state)
 
int64_t getPlayerPosition ()
 
int64_t getPlayerDuration ()
 

Static Public Attributes

static const int64_t TIME_UNKNOWN = -1
 

Detailed Description

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

The AudioPlayer MediaPlayer and Speaker will receive directives from the Engine to handle audio playback.

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

Member Typedef Documentation

◆ PlayerActivity

Alias the common PlayerActivity namespace.

Member Function Documentation

◆ playerActivityChanged()

virtual void aace::alexa::AudioPlayer::playerActivityChanged ( PlayerActivity  state)
inlinevirtual

Notifies the platform implementation of a change in audio playback state

Parameters
[in]stateThe new playback state

◆ getPlayerPosition()

int64_t 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()

int64_t 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 duration is unknown or invalid.

Member Data Documentation

◆ TIME_UNKNOWN

const int64_t aace::alexa::AudioPlayer::TIME_UNKNOWN = -1
static

Used when audio time is unknown or indeterminate.


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