AlexaClientSDK  1.18.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Enumerations | Functions | Variables
alexaClientSDK::avsCommon::utils::mediaPlayer Namespace Reference

Namespaces

 test
 

Classes

class  MediaPlayerFactoryInterface
 
class  MediaPlayerFactoryObserverInterface
 
class  MediaPlayerInterface
 
class  MediaPlayerObserverInterface
 
struct  MediaPlayerState
 
struct  PlaybackAttributes
 
struct  PlaybackReport
 
struct  SourceConfig
 

Enumerations

enum  ErrorType {
  ErrorType::MEDIA_ERROR_UNKNOWN, ErrorType::MEDIA_ERROR_INVALID_REQUEST, ErrorType::MEDIA_ERROR_SERVICE_UNAVAILABLE, ErrorType::MEDIA_ERROR_INTERNAL_SERVER_ERROR,
  ErrorType::MEDIA_ERROR_INTERNAL_DEVICE_ERROR, ErrorType::MEDIA_ERROR_UNKNOWN, ErrorType::MEDIA_ERROR_INVALID_REQUEST, ErrorType::MEDIA_ERROR_SERVICE_UNAVAILABLE,
  ErrorType::MEDIA_ERROR_INTERNAL_SERVER_ERROR, ErrorType::MEDIA_ERROR_INTERNAL_DEVICE_ERROR
}
 Identifies the specific type of error in a PlaybackFailed event. More...
 
enum  ErrorType {
  ErrorType::MEDIA_ERROR_UNKNOWN, ErrorType::MEDIA_ERROR_INVALID_REQUEST, ErrorType::MEDIA_ERROR_SERVICE_UNAVAILABLE, ErrorType::MEDIA_ERROR_INTERNAL_SERVER_ERROR,
  ErrorType::MEDIA_ERROR_INTERNAL_DEVICE_ERROR, ErrorType::MEDIA_ERROR_UNKNOWN, ErrorType::MEDIA_ERROR_INVALID_REQUEST, ErrorType::MEDIA_ERROR_SERVICE_UNAVAILABLE,
  ErrorType::MEDIA_ERROR_INTERNAL_SERVER_ERROR, ErrorType::MEDIA_ERROR_INTERNAL_DEVICE_ERROR
}
 Identifies the specific type of error in a PlaybackFailed event. More...
 

Functions

std::string errorTypeToString (ErrorType errorType)
 
std::ostream & operator<< (std::ostream &stream, const ErrorType &errorType)
 
std::ostream & operator<< (std::ostream &stream, const MediaPlayerState &state)
 
SourceConfig emptySourceConfig ()
 
std::ostream & operator<< (std::ostream &stream, const SourceConfig &config)
 

Variables

static const std::chrono::milliseconds MEDIA_PLAYER_INVALID_OFFSET {-1}
 Represents offset returned when MediaPlayer is in an invalid state. More...
 
static constexpr short MAX_GAIN = 100
 Maximum gain supported. More...
 
static constexpr short MIN_GAIN = 0
 Minimum gain supported. More...
 

Enumeration Type Documentation

◆ ErrorType [1/2]

Identifies the specific type of error in a PlaybackFailed event.

Enumerator
MEDIA_ERROR_UNKNOWN 

An unknown error occurred.

MEDIA_ERROR_INVALID_REQUEST 

The server recognized the request as being malformed (bad request, unauthorized, forbidden, not found, etc).

MEDIA_ERROR_SERVICE_UNAVAILABLE 

The client was unable to reach the service.

MEDIA_ERROR_INTERNAL_SERVER_ERROR 

The server accepted the request, but was unable to process the request as expected.

MEDIA_ERROR_INTERNAL_DEVICE_ERROR 

There was an internal error on the client.

MEDIA_ERROR_UNKNOWN 

An unknown error occurred.

MEDIA_ERROR_INVALID_REQUEST 

The server recognized the request as being malformed (bad request, unauthorized, forbidden, not found, etc).

MEDIA_ERROR_SERVICE_UNAVAILABLE 

The client was unable to reach the service.

MEDIA_ERROR_INTERNAL_SERVER_ERROR 

The server accepted the request, but was unable to process the request as expected.

MEDIA_ERROR_INTERNAL_DEVICE_ERROR 

There was an internal error on the client.

◆ ErrorType [2/2]

Identifies the specific type of error in a PlaybackFailed event.

Enumerator
MEDIA_ERROR_UNKNOWN 

An unknown error occurred.

MEDIA_ERROR_INVALID_REQUEST 

The server recognized the request as being malformed (bad request, unauthorized, forbidden, not found, etc).

MEDIA_ERROR_SERVICE_UNAVAILABLE 

The client was unable to reach the service.

MEDIA_ERROR_INTERNAL_SERVER_ERROR 

The server accepted the request, but was unable to process the request as expected.

MEDIA_ERROR_INTERNAL_DEVICE_ERROR 

There was an internal error on the client.

MEDIA_ERROR_UNKNOWN 

An unknown error occurred.

MEDIA_ERROR_INVALID_REQUEST 

The server recognized the request as being malformed (bad request, unauthorized, forbidden, not found, etc).

MEDIA_ERROR_SERVICE_UNAVAILABLE 

The client was unable to reach the service.

MEDIA_ERROR_INTERNAL_SERVER_ERROR 

The server accepted the request, but was unable to process the request as expected.

MEDIA_ERROR_INTERNAL_DEVICE_ERROR 

There was an internal error on the client.

Function Documentation

◆ emptySourceConfig()

SourceConfig alexaClientSDK::avsCommon::utils::mediaPlayer::emptySourceConfig ( )
inline

Builds a Source Config object with fade in disabled.

Returns
a Source Config object without fade in

◆ errorTypeToString()

std::string alexaClientSDK::avsCommon::utils::mediaPlayer::errorTypeToString ( ErrorType  errorType)
inline

Convert an ErrorType to an AVS-compliant std::string.

Parameters
errorTypeThe ErrorType to convert.
Returns
The AVS-compliant string representation of errorType.

◆ operator<<() [1/3]

std::ostream& alexaClientSDK::avsCommon::utils::mediaPlayer::operator<< ( std::ostream &  stream,
const ErrorType errorType 
)
inline

Write an ErrorType value to an ostream.

Parameters
streamThe stream to write the value to.
errorTypeThe ErrorType value to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

◆ operator<<() [2/3]

std::ostream& alexaClientSDK::avsCommon::utils::mediaPlayer::operator<< ( std::ostream &  stream,
const MediaPlayerState state 
)
inline

Write a MediaPlayerState to an ostream as a string.

Parameters
streamThe stream to write the value to.
stateThe state value to write to teh ostream as a string
Returns
The ostream that was passed in and written to.

◆ operator<<() [3/3]

std::ostream& alexaClientSDK::avsCommon::utils::mediaPlayer::operator<< ( std::ostream &  stream,
const SourceConfig config 
)
inline

Write a SourceConfig value to the given stream.

Parameters
streamThe stream to write the value to.
configThe value to write to the stream as a string.
Returns
The stream that was passed in and written to.

Variable Documentation

◆ MAX_GAIN

constexpr short alexaClientSDK::avsCommon::utils::mediaPlayer::MAX_GAIN = 100
staticconstexpr

Maximum gain supported.

◆ MEDIA_PLAYER_INVALID_OFFSET

const std::chrono::milliseconds alexaClientSDK::avsCommon::utils::mediaPlayer::MEDIA_PLAYER_INVALID_OFFSET {-1}
static

Represents offset returned when MediaPlayer is in an invalid state.

◆ MIN_GAIN

constexpr short alexaClientSDK::avsCommon::utils::mediaPlayer::MIN_GAIN = 0
staticconstexpr

Minimum gain supported.

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