This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
***Enhancements*** * Upgraded dependency to Device SDK 1.19.1 * Provided a reference implementation for rendering of captions * Support for APL 1.3 * Added support for visual metrics * Moved APL Core integration out of SampleApp into a standalone library ***Bug fixes*** * Fixed browser warnings caused by short-hand definition of "transition" property * Fixed potentially invalid and corrupted data due to using multiple rapidjson allocators ***Known issues*** * SampleApp screen cut off at the bottom on fullscreen when using emulateDisplayDimensions configuration * Display of captions is not in sync with Alexa audio and is as expected * Memory leak issue with resetDevice member function in GUIManager * Notification cues are not playing * Potential memory leak issue with executeCommands directive * Skill session remains alive for a short amount of time after exit * Control buttons on the Flash briefing page is disabled * Buttons on Now Playing display card do not update their visual states when updated by voice * Scrolling on General Knowledge display card does not work when the content does not fit into screen * Progress bar on Now Playing display card does not reflect the actual audio offset when such information is not provided in RenderPlayerInfo directive
- Loading branch information
1 parent
c2196be
commit b6e5a4c
Showing
252 changed files
with
25,939 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR) | ||
project(APLClient LANGUAGES CXX) | ||
|
||
include(../../build/BuildDefaults.cmake) | ||
|
||
add_subdirectory("src") |
115 changes: 115 additions & 0 deletions
115
modules/Alexa/ApplicationUtilities/APLClient/include/APLClient/AplClientBinding.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
#ifndef ALEXA_SMART_SCREEN_SDK_APPLICATIONUTILITIES_APL_APLCLIENTBINDING_H_ | ||
#define ALEXA_SMART_SCREEN_SDK_APPLICATIONUTILITIES_APL_APLCLIENTBINDING_H_ | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <rapidjson/document.h> | ||
#include "AplCoreConnectionManager.h" | ||
#include "AplCoreGuiRenderer.h" | ||
#include "AplOptionsInterface.h" | ||
|
||
namespace APLClient { | ||
|
||
/** | ||
* AplClientBinding abstracts away many of the implementation details of integrating with the APLCoreEngine and exposes | ||
* a smaller interface to allow rendering of APL documents on a remote view host through a client provided IPC layer. | ||
*/ | ||
class AplClientBinding { | ||
public: | ||
/** | ||
* Constructor | ||
*/ | ||
AplClientBinding(AplOptionsInterfacePtr options); | ||
|
||
virtual ~AplClientBinding() = default; | ||
|
||
/** | ||
* Pass a message received from the viewhost to the @c AplClientBinding, this should be called before | ||
* @c handleMessage and on a different thread to @c renderDocument. | ||
* @note This is a workaround to allow support for devices which do not support synchronous sends | ||
* | ||
* @param message | ||
* @return true if the message should be passed onwards to handleMessage, false if handling is complete | ||
*/ | ||
bool shouldHandleMessage(const std::string& message); | ||
|
||
/** | ||
* Pass a message received from the viewhost to the @c AplClientBinding, should only be called if | ||
* @c shouldHandleMessage returns true and must be run on the same thread as @c renderDocument | ||
* @param message The message from the viewhost | ||
*/ | ||
void handleMessage(const std::string& message); | ||
|
||
/** | ||
* Render an APL document | ||
* @param document The document json payload | ||
* @param data The document data | ||
* @param viewports The supported viewports | ||
* @param token The APL document token | ||
*/ | ||
void renderDocument( | ||
const std::string& document, | ||
const std::string& data, | ||
const std::string& viewports, | ||
const std::string& token); | ||
|
||
/** | ||
* Clears the current APL document | ||
*/ | ||
void clearDocument(); | ||
|
||
/** | ||
* Execute an APL command sequence | ||
* @param jsonPayload The JSON APL command payload | ||
* @param token The APL document token | ||
*/ | ||
void executeCommands(const std::string& jsonPayload, const std::string& token); | ||
|
||
/** | ||
* Interrupts the currently executing command sequence | ||
*/ | ||
void interruptCommandSequence(); | ||
|
||
/** | ||
* Requests the visual context | ||
*/ | ||
void requestVisualContext(unsigned int stateRequestToken); | ||
|
||
/** | ||
* Updates the data source | ||
* @param sourceType The source type | ||
* @param jsonPayload The json payload containing the new data | ||
* @param token The APL token | ||
*/ | ||
void dataSourceUpdate(const std::string& sourceType, const std::string& jsonPayload, const std::string& token); | ||
|
||
/** | ||
* Updates the rendered document | ||
* @note Ideally this function should should be called once for each screen refresh (e.g. 60 times per second) | ||
*/ | ||
void onUpdateTick(); | ||
|
||
private: | ||
AplOptionsInterfacePtr m_aplOptions; | ||
|
||
AplCoreConnectionManagerPtr m_aplConnectionManager; | ||
|
||
std::unique_ptr<AplCoreGuiRenderer> m_aplGuiRenderer; | ||
}; | ||
} // namespace APLClient | ||
#endif // ALEXA_SMART_SCREEN_SDK_APPLICATIONUTILITIES_APL_APLCLIENTBINDING_H_ |
Oops, something went wrong.