I have not used this together yet.
The directives
-array doesn’t have the APL directive? This could be a bug.
Could you try it with a raw response object with both directives?
Add this json to this.$rawResponseJson
{
"version": "1.0",
"response": {
"shouldEndSession": false,
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>test</speak>"
},
"reprompt": {
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>test</speak>"
}
},
directives: [
{
"type": "Dialog.ElicitSlot",
"slotToElicit": "flightType"
},
{
"type": "Alexa.Presentation.APL.RenderDocument",
"version": "1.0",
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [
{
"name": "alexa-viewport-profiles",
"version": "1.1.0"
},
{
"name": "alexa-styles",
"version": "1.1.0"
},
{
"name": "alexa-layouts",
"version": "1.1.0"
}
],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
"commands": {},
"layouts": {},
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Container",
"height": "100vh",
"width": "100vw",
"items": [
{
"type": "AlexaBackground",
"backgroundColor": "#FFACF8"
},
{
"type": "Image",
"width": "100vw",
"height": "100vh",
"source": "https://alexa-files-20120.s3.us-east-2.amazonaws.com/apl/images/large/jet-bokeh-red.jpg",
"scale": "best-fill",
"align": "left",
"position": "absolute"
},
{
"when": "${@viewportShape == @viewportShapeRectangle}",
"type": "Text",
"width": "100vw",
"height": "auto",
"paddingTop": "15vh",
"text": "Most economical, nonstop, <br>or first-class flight?",
"fontSize": "50dp",
"textAlign": "center",
"textAlignVertical": "top",
"fontWeight": "100",
"color": "white"
},
{
"when": "${@viewportShape == @viewportShapeRound}",
"type": "Text",
"width": "100vw",
"height": "auto",
"paddingTop": "20vh",
"text": "Most economical, <br>nonstop, or first-class flight?",
"fontSize": "40dp",
"textAlign": "center",
"textAlignVertical": "top",
"fontWeight": "100",
"color": "white"
},
{
"when": "${@viewportShape == @viewportShapeRectangle}",
"type": "Text",
"width": "100vw",
"height": "auto",
"paddingTop": "10vh",
"paddingBottom": "7vh",
"position": "absolute",
"text": "Try \"Alexa, book a flight from Boston to JFK\"",
"fontSize": "35dp",
"fontFamily": "Bookerly",
"fontStyle": "italic",
"textAlign": "center",
"textAlignVertical": "bottom",
"color": "white",
"bottom": "7vh"
},
{
"type": "Image",
"width": "100vw",
"height": "32vh",
"paddingLeft": "20vw",
"paddingRight": "20vw",
"paddingTop": "10vh",
"source": "https://alexa-files-20120.s3.us-east-2.amazonaws.com/apl/images/iconswhite.png"
}
]
}
]
}
},
"datasources": {}
}
]
},
"sessionAttributes": {
}
}