![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ExternalMediaAdapterHandlerInterface.h>
Classes | |
struct | PlayParams |
PlayParams is a struct that contains the parameters for the play method. More... | |
Public Member Functions | |
ExternalMediaAdapterHandlerInterface (const std::string &name) | |
virtual | ~ExternalMediaAdapterHandlerInterface ()=default |
virtual std::vector< PlayerInfo > | updatePlayerInfo (const std::vector< PlayerInfo > &playerList)=0 |
virtual bool | login (const std::string &localPlayerId, const std::string &accessToken, const std::string &userName, bool forceLogin, std::chrono::milliseconds tokenRefreshInterval)=0 |
virtual bool | logout (const std::string &localPlayerId)=0 |
virtual bool | play (const PlayParams ¶ms)=0 |
virtual bool | playControl (const std::string &localPlayerId, acsdkExternalMediaPlayerInterfaces::RequestType requestType, const std::string &playbackTarget)=0 |
virtual bool | seek (const std::string &localPlayerId, std::chrono::milliseconds offset)=0 |
virtual bool | adjustSeek (const std::string &localPlayerId, std::chrono::milliseconds deltaOffset)=0 |
virtual acsdkExternalMediaPlayerInterfaces::AdapterState | getAdapterState (const std::string &localPlayerId)=0 |
virtual std::vector< acsdkExternalMediaPlayerInterfaces::AdapterState > | getAdapterStates ()=0 |
virtual std::chrono::milliseconds | getOffset (const std::string &localPlayerId)=0 |
virtual void | setExternalMediaPlayer (const std::shared_ptr< ExternalMediaPlayerInterface > externalMediaPlayer)=0 |
![]() | |
RequiresShutdown (const std::string &name) | |
virtual | ~RequiresShutdown () |
Destructor. More... | |
const std::string & | name () const |
void | shutdown () |
bool | isShutdown () const |
Additional Inherited Members | |
![]() | |
virtual void | doShutdown ()=0 |
The ExternalMediaAdapterHandlerInterface specifies the interface of adapter handler objects which interact with third party music service providers. The adapter handler may handle multiple players distinguished by a different player ID and provides users with an interface to manage playback control and session management.
|
inlineexplicit |
Constructor
name | The name to identify this ExternalMediaAdapterHandler |
|
virtualdefault |
Destructor
|
pure virtual |
Method to seek to an offset from the current position.
localPlayerId | The localPlayerId that this seek control is targeted at |
deltaOffset | The offset to seek to relative to the current offset. |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to fetch the state(session state and playback state) of an adapter.
localPlayerId | The player ID for which the state is being requested |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to fetch the state for all adapters handled by this adapter handler
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
This function retrieves the offset of the current track the adapter is handling.
localPlayerId | The player ID for which the offset is being requested |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to allow a user to login to a third party music provider.
localPlayerId | The local player ID being logged in |
accessToken | The access context of the user identifier. |
userName | The userName of the user logging in. |
forceLogin | bool which signifies if the adapter has to a force a login or merely cache the access token. |
tokenRefreshInterval | The duration in milliseconds for which the accessToken is valid. |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method that handles logging out a user from a third party library/cloud.
localPlayerId | The local player ID being logged out |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to allow a user to initiate play from a third party music service provider based on a play context.
params | Play parameters required for playback |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to initiate the different types of play control like PLAY/PAUSE/RESUME/NEXT/...
localPlayerId | The localPlayerId that this play control is targeted at |
requestType | The type of REQUEST. Will always be PLAY/PAUSE/RESUME/NEXT... |
playbackTarget | Playback target to handle play control with |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to seek to the given offset.
localPlayerId | The localPlayerId that this seek control is targeted at |
offset | The offset to seek to. |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
|
pure virtual |
Method to set the external media player interface used by this handler
externalMediaPlayer | Pointer to the external media player |
|
pure virtual |
Method to notify the handler that the cloud status of given players has been updated. This method also provides the playerId and skillToken as identified by the cloud. The cloud support for a player may be revoked at any time. The state of any players not included on the playerList should be assumed to be unchanged.
playerList | The list of players whose state has changed |
Implemented in alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaAdapterHandler, and alexaClientSDK::acsdkExternalMediaPlayer::StaticExternalMediaPlayerAdapterHandler.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0