AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ExternalMediaPlayer.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAPLAYER_H_
17 #define ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAPLAYER_H_
18 
19 #include <map>
20 #include <memory>
21 #include <mutex>
22 #include <queue>
23 #include <string>
24 #include <unordered_map>
25 #include <utility>
26 
58 
61 
62 namespace alexaClientSDK {
63 namespace acsdkExternalMediaPlayer {
64 
83  , public std::enable_shared_from_this<ExternalMediaPlayer> {
84 public:
85  // Map of adapter business names to their mediaPlayers.
86  using AdapterMediaPlayerMap =
87  std::unordered_map<std::string, std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>>;
88 
89  // Map of adapter business names to their speakers.
90  using AdapterSpeakerMap =
91  std::unordered_map<std::string, std::shared_ptr<avsCommon::sdkInterfaces::ChannelVolumeInterface>>;
92 
93  // Signature of functions to create an ExternalMediaAdapter.
94  using AdapterCreateFunction =
95  std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface> (*)(
96  std::shared_ptr<alexaClientSDK::avsCommon::utils::metrics::MetricRecorderInterface>,
97  std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> mediaPlayer,
98  std::shared_ptr<avsCommon::sdkInterfaces::ChannelVolumeInterface> speaker,
99  std::shared_ptr<avsCommon::sdkInterfaces::SpeakerManagerInterface> speakerManager,
100  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender,
101  std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface> focusManager,
102  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
103  std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerInterface> externalMediaPlayer);
104 
105  // Map of adapter business names to their creation method.
106  using AdapterCreationMap = std::unordered_map<std::string, AdapterCreateFunction>;
107 
109  static constexpr const char* SPI_VERSION = "1.0";
110 
117  static std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerInterface>
118  createExternalMediaPlayerInterface(std::shared_ptr<ExternalMediaPlayer> externalMediaPlayer);
119 
136  static std::shared_ptr<ExternalMediaPlayer> createExternalMediaPlayer(
137  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender,
138  std::shared_ptr<certifiedSender::CertifiedSender> certifiedMessageSender,
139  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
140  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
141  std::shared_ptr<avsCommon::sdkInterfaces::PlaybackRouterInterface> playbackRouter,
145  std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> shutdownNotifier,
146  std::shared_ptr<acsdkStartupManagerInterfaces::StartupNotifierInterface> startupNotifier,
147  std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderRegistrarInterface>
148  renderPlayerInfoCardsProviderRegistrar,
149  std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder);
150 
175  static std::shared_ptr<ExternalMediaPlayer> createExternalMediaPlayerWithAdapters(
177  std::shared_ptr<acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface>
178  audioPipelineFactory,
179  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender,
180  std::shared_ptr<certifiedSender::CertifiedSender> certifiedMessageSender,
184  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
185  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
186  std::shared_ptr<avsCommon::sdkInterfaces::PlaybackRouterInterface> playbackRouter,
190  std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> shutdownNotifier,
191  std::shared_ptr<acsdkStartupManagerInterfaces::StartupNotifierInterface> startupNotifier,
192  std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderRegistrarInterface>
193  renderPlayerInfoCardsProviderRegistrar,
194  std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder,
195  std::shared_ptr<avsCommon::sdkInterfaces::SpeakerManagerInterface> speakerManager);
196 
199  void onContextAvailable(const std::string& jsonContext) override;
202 
205  void provideState(const avsCommon::avs::NamespaceAndName& stateProviderName, unsigned int stateRequestToken)
206  override;
208 
211  void handleDirectiveImmediately(std::shared_ptr<avsCommon::avs::AVSDirective> directive) override;
212  void preHandleDirective(std::shared_ptr<DirectiveInfo> info) override;
213  void handleDirective(std::shared_ptr<DirectiveInfo> info) override;
214  void cancelDirective(std::shared_ptr<DirectiveInfo> info) override;
215  void onDeregistered() override;
218 
221  virtual void onButtonPressed(avsCommon::avs::PlaybackButton button) override;
222 
223  virtual void onTogglePressed(avsCommon::avs::PlaybackToggle toggle, bool action) override;
225 
228  virtual void setPlayerInFocus(const std::string& playerInFocus) override;
229  virtual void updateDiscoveredPlayers(
230  const std::vector<acsdkExternalMediaPlayerInterfaces::DiscoveredPlayerInfo>& addedPlayers,
231  const std::unordered_set<std::string>& removedLocalPlayerIds) override;
232  virtual void addAdapterHandler(
233  std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface> adapterHandler)
234  override;
235  virtual void removeAdapterHandler(
236  std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface> adapterHandler)
237  override;
238  virtual void addObserver(
239  const std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface> observer)
240  override;
241  virtual void removeObserver(
242  const std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface> observer)
243  override;
245 
248  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> getCapabilityConfigurations() override;
250 
253  void setObserver(
254  std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface> observer) override;
256 
259  bool localOperation(PlaybackOperation op) override;
260  bool localSeekTo(std::chrono::milliseconds location, bool fromStart) override;
262 
265  std::chrono::milliseconds getAudioItemOffset() override;
266  std::chrono::milliseconds getAudioItemDuration() override;
268 
275  std::map<std::string, std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface>>
276  getAdaptersMap();
277 
280  bool startup() override;
282 
283 private:
287  struct LocalPlayerIdHandler {
288  std::string localPlayerId;
289  std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface> adapterHandler;
290  };
291 
309  static std::shared_ptr<ExternalMediaPlayer> create(
310  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender,
311  std::shared_ptr<certifiedSender::CertifiedSender> certifiedMessageSender,
312  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
313  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
314  std::shared_ptr<avsCommon::sdkInterfaces::PlaybackRouterInterface> playbackRouter,
318  std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> shutdownNotifier,
319  std::shared_ptr<acsdkStartupManagerInterfaces::StartupNotifierInterface> startupNotifier,
320  std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderRegistrarInterface>
321  renderPlayerInfoCardsProviderRegistrar,
322  std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder);
323 
340  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender,
341  std::shared_ptr<certifiedSender::CertifiedSender> certifiedMessageSender,
342  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
343  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
344  std::shared_ptr<avsCommon::sdkInterfaces::PlaybackRouterInterface> playbackRouter,
345  std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder);
346 
352  bool init();
353 
364  void createAdapters(
365  const AdapterCreationMap& adapterCreationMap,
366  std::shared_ptr<acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface>
367  audioPipelineFactory,
368  std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface> focusManager,
369  std::shared_ptr<avsCommon::sdkInterfaces::SpeakerManagerInterface> speakerManager);
370 
377  std::string provideSessionState(std::vector<acsdkExternalMediaPlayerInterfaces::AdapterState> adapterStates);
378 
385  std::string providePlaybackState(std::vector<acsdkExternalMediaPlayerInterfaces::AdapterState> adapterStates);
386 
395  bool parseDirectivePayload(std::shared_ptr<DirectiveInfo> info, rapidjson::Document* document);
396 
403  void removeDirective(std::shared_ptr<DirectiveInfo> info);
404 
407  void doShutdown() override;
409 
415  void sendReportDiscoveredPlayersEvent(
416  const std::vector<acsdkExternalMediaPlayerInterfaces::DiscoveredPlayerInfo>& discoveredPlayers);
417 
426  void sendAuthorizationCompleteEvent(
427  const std::unordered_map<std::string, std::string>& authorized,
428  const std::unordered_set<std::string>& deauthorized);
429 
436  void setHandlingCompleted(std::shared_ptr<DirectiveInfo> info);
437 
448  void sendExceptionEncounteredAndReportFailed(
449  std::shared_ptr<DirectiveInfo> info,
450  const std::string& message,
452 
461 
477  void executeProvideState(
478  const avsCommon::avs::NamespaceAndName& stateProviderName,
479  bool sendToken = false,
480  unsigned int stateRequestToken = 0);
482 
490  bool preprocessDirective(std::shared_ptr<DirectiveInfo> info, rapidjson::Document* document);
491 
499  avsCommon::utils::Optional<LocalPlayerIdHandler> getHandlerFromPlayerId(const std::string& playerId);
500 
508  void handleAuthorizeDiscoveredPlayers(
509  std::shared_ptr<DirectiveInfo> info,
511 
518  void handleLogin(std::shared_ptr<DirectiveInfo> info, acsdkExternalMediaPlayerInterfaces::RequestType request);
519 
526  void handleLogout(std::shared_ptr<DirectiveInfo> info, acsdkExternalMediaPlayerInterfaces::RequestType request);
527 
534  void handlePlay(std::shared_ptr<DirectiveInfo> info, acsdkExternalMediaPlayerInterfaces::RequestType request);
535 
543  void handlePlayControl(
544  std::shared_ptr<DirectiveInfo> info,
546 
553  void handleSeek(std::shared_ptr<DirectiveInfo> info, acsdkExternalMediaPlayerInterfaces::RequestType request);
554 
561  void handleAdjustSeek(std::shared_ptr<DirectiveInfo> info, acsdkExternalMediaPlayerInterfaces::RequestType request);
562 
570  void notifyObservers(
571  const std::string& playerId,
573 
582  void notifyObservers(
583  const std::string& playerId,
585 
595  void notifyObservers(
596  const std::string& playerId,
599 
604  void notifyRenderPlayerInfoCardsObservers();
605 
607  std::string m_agentString;
608 
610  std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> m_metricRecorder;
611 
613  std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> m_messageSender;
614 
616  std::shared_ptr<certifiedSender::CertifiedSender> m_certifiedMessageSender;
617 
619  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
620 
623  std::shared_ptr<avsCommon::sdkInterfaces::PlaybackRouterInterface> m_playbackRouter;
624 
626  std::mutex m_authorizedMutex;
627 
629  std::unordered_map<std::string, LocalPlayerIdHandler> m_authorizedAdapters;
630 
632  std::map<std::string, std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface>>
633  m_staticAdapters;
634 
637  std::string m_playerInFocus;
638 
640  std::mutex m_inFocusAdapterMutex;
641 
643  std::shared_ptr<AuthorizedSender> m_authorizedSender;
644 
646  std::mutex m_observersMutex;
647 
649  std::unordered_set<std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface>>
650  m_observers;
651 
653  std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface> m_renderPlayerObserver;
654 
657  std::queue<std::pair<std::string, std::string>> m_eventQueue;
658 
660  typedef void (ExternalMediaPlayer::*DirectiveHandler)(
661  std::shared_ptr<DirectiveInfo> info,
663 
665  static std::unordered_map<
667  std::pair<acsdkExternalMediaPlayerInterfaces::RequestType, ExternalMediaPlayer::DirectiveHandler>>
668  m_directiveToHandlerMap;
669 
671  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> m_capabilityConfigurations;
672 
674  std::unordered_set<std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface>>
675  m_adapterHandlers;
676 
678  std::unordered_set<std::string> m_reportedDiscoveredPlayers;
679 
682  std::unordered_map<std::string, acsdkExternalMediaPlayerInterfaces::DiscoveredPlayerInfo>
683  m_unreportedPlayersToReportAtStartup;
684 
686  std::mutex m_onStartupHasBeenCalledMutex;
687 
689  bool m_onStartupHasBeenCalled;
690 
692  std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface> m_focusManager;
693 
701 };
702 
703 } // namespace acsdkExternalMediaPlayer
704 } // namespace alexaClientSDK
705 
706 #endif // ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAPLAYER_H_
virtual void onTogglePressed(avsCommon::avs::PlaybackToggle toggle, bool action) override
Definition: ExternalMediaPlayer.cpp:1580
void onContextFailure(const avsCommon::sdkInterfaces::ContextRequestError error) override
Definition: ExternalMediaPlayer.cpp:665
virtual void updateDiscoveredPlayers(const std::vector< acsdkExternalMediaPlayerInterfaces::DiscoveredPlayerInfo > &addedPlayers, const std::unordered_set< std::string > &removedLocalPlayerIds) override
Definition: ExternalMediaPlayer.cpp:1503
Definition: CapabilityAgent.h:47
Definition: ExternalMediaPlayerObserverInterface.h:29
Definition: NamespaceAndName.h:32
std::chrono::milliseconds getAudioItemDuration() override
Definition: ExternalMediaPlayer.cpp:1459
void onContextAvailable(const std::string &jsonContext) override
Definition: ExternalMediaPlayer.cpp:648
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: ExternalMediaPlayer.cpp:682
virtual void addObserver(const std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface > observer) override
Definition: ExternalMediaPlayer.cpp:1856
RequestType
Definition: ExternalMediaAdapterInterface.h:32
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
Definition: ExternalMediaPlayer.cpp:1352
static constexpr const char * SPI_VERSION
The spiVersion of this implementation of ExternalMediaPlayer.
Definition: ExternalMediaPlayer.h:109
ContextRequestError
Definition: ContextRequesterInterface.h:40
std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface >(*)(std::shared_ptr< alexaClientSDK::avsCommon::utils::metrics::MetricRecorderInterface >, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > mediaPlayer, std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeInterface > speaker, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > speakerManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface > focusManager, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerInterface > externalMediaPlayer) AdapterCreateFunction
Definition: ExternalMediaPlayer.h:103
virtual void setPlayerInFocus(const std::string &playerInFocus) override
Definition: ExternalMediaPlayer.cpp:1482
void onDeregistered() override
Definition: ExternalMediaPlayer.cpp:1349
ExceptionErrorType
Definition: ExceptionErrorType.h:28
virtual void removeObserver(const std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerObserverInterface > observer) override
Definition: ExternalMediaPlayer.cpp:1865
void handleDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: ExternalMediaPlayer.cpp:707
void provideState(const avsCommon::avs::NamespaceAndName &stateProviderName, unsigned int stateRequestToken) override
Definition: ExternalMediaPlayer.cpp:674
PlaybackButton
Enumeration class for supported playback buttons.
Definition: PlaybackButtons.h:26
std::chrono::milliseconds getAudioItemOffset() override
Definition: ExternalMediaPlayer.cpp:1436
std::unordered_map< std::string, AdapterCreateFunction > AdapterCreationMap
Definition: ExternalMediaPlayer.h:106
static std::shared_ptr< ExternalMediaPlayer > createExternalMediaPlayerWithAdapters(const acsdkExternalMediaPlayer::ExternalMediaPlayer::AdapterCreationMap &adapterCreationMap, std::shared_ptr< acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface > audioPipelineFactory, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< certifiedSender::CertifiedSender > certifiedMessageSender, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::AudioFocusAnnotation, avsCommon::sdkInterfaces::FocusManagerInterface > audioFocusManager, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, std::shared_ptr< avsCommon::sdkInterfaces::PlaybackRouterInterface > playbackRouter, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > endpointCapabilitiesRegistrar, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier, std::shared_ptr< acsdkStartupManagerInterfaces::StartupNotifierInterface > startupNotifier, std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderRegistrarInterface > renderPlayerInfoCardsProviderRegistrar, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > speakerManager)
Definition: ExternalMediaPlayer.cpp:380
bool localSeekTo(std::chrono::milliseconds location, bool fromStart) override
Definition: ExternalMediaPlayer.cpp:1406
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
void preHandleDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: ExternalMediaPlayer.cpp:686
PlaybackOperation
Definition: LocalPlaybackHandlerInterface.h:40
virtual void addAdapterHandler(std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface > adapterHandler) override
Definition: ExternalMediaPlayer.cpp:1945
virtual void onButtonPressed(avsCommon::avs::PlaybackButton button) override
Definition: ExternalMediaPlayer.cpp:1552
std::unordered_map< std::string, std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > > AdapterMediaPlayerMap
Definition: ExternalMediaPlayer.h:87
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::map< std::string, std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface > > getAdaptersMap()
Definition: ExternalMediaPlayer.cpp:917
static std::shared_ptr< ExternalMediaPlayer > createExternalMediaPlayer(std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< certifiedSender::CertifiedSender > certifiedMessageSender, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, std::shared_ptr< avsCommon::sdkInterfaces::PlaybackRouterInterface > playbackRouter, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > endpointCapabilitiesRegistrar, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier, std::shared_ptr< acsdkStartupManagerInterfaces::StartupNotifierInterface > startupNotifier, std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderRegistrarInterface > renderPlayerInfoCardsProviderRegistrar, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder)
Definition: ExternalMediaPlayer.cpp:346
virtual void removeAdapterHandler(std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterHandlerInterface > adapterHandler) override
Definition: ExternalMediaPlayer.cpp:1960
std::unordered_map< std::string, std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeInterface > > AdapterSpeakerMap
Definition: ExternalMediaPlayer.h:91
bool startup() override
Definition: ExternalMediaPlayer.cpp:1973
bool localOperation(PlaybackOperation op) override
Definition: ExternalMediaPlayer.cpp:1363
void setObserver(std::shared_ptr< avsCommon::sdkInterfaces::RenderPlayerInfoCardsObserverInterface > observer) override
Definition: ExternalMediaPlayer.cpp:1356
PlaybackToggle
Definition: PlaybackButtons.h:46
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override
Definition: ExternalMediaPlayer.cpp:1852
Definition: RenderPlayerInfoCardsProviderInterface.h:30
static std::shared_ptr< acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerInterface > createExternalMediaPlayerInterface(std::shared_ptr< ExternalMediaPlayer > externalMediaPlayer)
Definition: ExternalMediaPlayer.cpp:342
void cancelDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: ExternalMediaPlayer.cpp:1345

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0