Alexa Auto SDK  2.0.0
Classes | Public Member Functions | List of all members
com.amazon.aace.alexa.LocalMediaSource Class Referenceabstract

Classes

enum  ContentSelector
 
enum  Favorites
 
enum  MediaType
 
enum  PlayControlType
 
enum  Source
 
enum  SupportedPlaybackOperation
 

Public Member Functions

boolean play (ContentSelector selector, String payload)
 
boolean playControl (PlayControlType controlType)
 
boolean seek (long offset)
 
boolean adjustSeek (long deltaOffset)
 
LocalMediaSourceState getState ()
 
void playerEvent (String eventName)
 
void playerError (String errorName, long code, String description, boolean fatal)
 
void setFocus ()
 
final Source getSource ()
 
boolean volumeChanged (float volume)
 
boolean mutedStateChanged (MutedState state)
 

Detailed Description

TODO LocalMediaSource class ...

Member Function Documentation

◆ play()

boolean com.amazon.aace.alexa.LocalMediaSource.play ( ContentSelector  selector,
String  payload 
)

Called when the user first calls play for the local media via voice control. ( Currently this is not used in LocalMediaSource)

Returns
true if the platform implementation successfully handled the call, else false

◆ playControl()

boolean com.amazon.aace.alexa.LocalMediaSource.playControl ( PlayControlType  controlType)

Occurs during playback control via voice interaction or PlaybackController interface

Parameters
controlTypePlayback control type being invoked
See also
PlaybackController
Returns
true if the platform implementation successfully handled the call, else false

◆ seek()

boolean com.amazon.aace.alexa.LocalMediaSource.seek ( long  offset)

Called when the user invokes local media seek via speech.

Parameters
offsetOffset position within media item, in milliseconds
Returns
true if the platform implementation successfully handled the call, else false

◆ adjustSeek()

boolean com.amazon.aace.alexa.LocalMediaSource.adjustSeek ( long  deltaOffset)

Called when the user invokes local media adjust seek via speech.

Parameters
deltaOffsetChange in offset position within media item, in milliseconds
Returns
true if the platform implementation successfully handled the call, else false

◆ getState()

LocalMediaSourceState com.amazon.aace.alexa.LocalMediaSource.getState ( )

Must provide the local media source , and information to maintain cloud sync

Returns
The current LocalMediaSourceState for the local media source, or null if the state is not available

◆ playerEvent()

void com.amazon.aace.alexa.LocalMediaSource.playerEvent ( String  eventName)

Should be called on a local media source player event. This will sync the context with AVS.

Parameters
eventNameCanonical event name

◆ playerError()

void com.amazon.aace.alexa.LocalMediaSource.playerError ( String  errorName,
long  code,
String  description,
boolean  fatal 
)

Should be called on a local media source player error.

Parameters
errorNameThe name of the error
codeThe error code
descriptionThe detailed error description
fataltrue if the error is fatal

◆ setFocus()

void com.amazon.aace.alexa.LocalMediaSource.setFocus ( )

Should be called on local media source player events. This will switch the media focus to that context.

◆ getSource()

final Source com.amazon.aace.alexa.LocalMediaSource.getSource ( )

Return the source type the interface registered with

◆ volumeChanged()

boolean com.amazon.aace.alexa.LocalMediaSource.volumeChanged ( float  volume)

Notifies the platform implementation to set the volume of the output channel. The volume value should be scaled to fit the needs of the platform.

Parameters
[in]volumeThe volume to set on the output channel. volume is in the range [0,1].
Returns
true if the platform implementation successfully handled the call, else false

◆ mutedStateChanged()

boolean com.amazon.aace.alexa.LocalMediaSource.mutedStateChanged ( MutedState  state)

Notifies the platform implementation to apply a muted state has changed for the output channel

Parameters
[in]stateThe muted state to apply to the output channel. MutedState::MUTED when the output channel be muted, MutedState::UNMUTED when unmuted
Returns
true if the platform implementation successfully handled the call, else false

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