What's New in APL 1.5


(This is not the most recent version of the APL change log. Use the Other Versions option to see the documentation for the most recent version of the APL change log)

Alexa Presentation Language 1.5 introduces new features and capabilities for APL.

APL for audio (beta)

APL for audio 0.91

The APL for audio beta has been updated to version 0.91. This release includes the following new features:

  • New Repeat filter. Use this filter to repeat an audio clip a specific number of times.

    For details, see the Repeat filter.

  • New duration property available on all components. Use this property to adjust the duration of a component when the component is a child component of a Mixer.

    For details, see the duration property.

You can combine the Repeat filter and the duration property to create effects such as matching background audio to the exact length of speech. For an example, see the Repeat filter.

APL for audio 0.9

The APL for audio beta version 0.9 included the following new features:

  • Resources – You can now define resources in your APL for audio documents. A resource is a named constant that you use to specify a value instead of hardcoding values. You can create conditional resources based on characteristics of the user's device. Using resources helps simplify your APL code and ensure consistency. For details about creating and using resources, see Resources.
  • Compositions – You can now define compositions in your APL for audio documents. A composition combines components into a new "custom" component that you can use and reuse within the main template of your document. You can use conditional logic within the composition to choose which components to render in the final audio clip. Using compositions helps simplify your APL code and ensure consistency. For details about creating and using compositions, see Compositions.
  • Authoring tool updates – The authoring tool now provides additional tools for previewing your audio response:
    • You can click in the time line to listen to different portions of your response.
    • You can select a portion of the time line to play.
    • You can turn on a repeat mode to repeatedly play back the entire response or a portion response.

    For details about the authoring tool for APL for audio, see Use the authoring tool for APL for Audio.

APL responsive components and templates

Use the new and updated responsive components and templates to build APL responsive documents. To use the new components and templates, import the alexa-layouts package into your document. Be sure to specify 1.2.0 for the version.

{
  "import": [
    {
      "name": "alexa-layouts",
      "version": "1.2.0"
    }
  ]
}

For an overview of the components and templates, see Responsive Components and Templates.

New responsive components

For details about the new responsive components, see:

Updated responsive components and templates

APL 1.5 updates existing responsive components and templates.

  • AlexaButton – The AlexaButton component has the following changes:
    • The buttonStyle property now takes additional styles: ingress and egress.
    • The component has a new touchForward property to change the button text style.
  • AlexaTransportControls – The AlexaTransportControls component has new properties to define accessibility text. Voice over reads the string when the user selects the control on the screen. You can set the following new properties:
    • accessibilityLabel
    • secondaryControlsLeftAccessibilityLabel
    • secondaryControlsRightAccessibilityLabel
  • AlexaTextList – The AlexaTextList template now supports the new AlexaSwipeToAction component. This new component has the same properties as AlexaTextListItem. This lets you create a text list in which users can swipe the items to take an action.

    The change adds the following new properties to AlexaTextList so that you can set defaults for the swipe items:

    • swipeDirection
    • swipeActionIcon
    • swipeActionIconType
    • swipeActionIconForeground
    • swipeActionIconBackground
    • onSwipeMove
    • onSwipeDone
    • optionsButton1Text
    • optionsButton1Command
    • optionsButton2Text
    • optionsButton2Command

New image filters

APL now supports a larger set of image filters to create different effects:

  • Blend – Merges two images together with a defined operation mode.
  • Color – Creates a solid color image and appends it to the array of images. Combine this filter with Blend to apply the color to your image.
  • Gradient – Creates a gradient image and appends it to the array of images. Combine this filter with Blend to apply the gradient to your image.
  • Grayscale – Converts the image to grayscale.
  • Saturate – Changes the color saturation of the image.

As part of this change, the Image component now takes an array of image URLs in the source or sources property.

For details about how filters work, see Filters.

Alexa Vector Graphics (AVG) improvements

The Alexa Vector Graphics (AVG) format now supports filters to apply effects to the graphic. The first available filter applies a drop-shadow to the graphic. For details, see AVG filters.

The AVG format also now supports multiple-child inflation. You can pass the AVG object an array of data in the data property. The graphic inflates one item out of the items array for each element in the data array. For details, see Alexa Vector Graphics Format.

General updates

  • When a Sequence is the source or target of an event, the event generated includes details about both fully visible child components and partially-visible child components. See Sequence event object.
  • When a GridSequence is the source or target of an event, the event generated includes details about both fully visible child components and partially-visible child components. See GridSequence event object.

New function calls

The String.length() function returns the length of a string in Unicode code points. For details, see String functions.

The new Array object in the data-binding context provides functions for manipulating arrays. For details, see Array functions.

The Math object in the data-binding context provides three new functions:

  • Math.isFinite(x)
  • Math.isInf(x)
  • Math.isNaN(x)

For details, see Math functions

New environment properties

New environment properties are available in the data-binding context:

Component properties

All components now include new properties to improve how APL works with assistive technologies:

The accessibilityLabel base component property is now dynamic, so you can change its value with the SetValue command.

Child components within a Container now support using the left, right, top, and bottom properties with relative positioning, in addition to absolute positioning. Previously, these positioning properties were ignored when position is set to relative. Now, these properties offset the child component from the component's normal position in the parent container.

For details about using these properties, see position, bottom, left, right, top.

Work with APL versions

For details about how to check the APL version, see What's New in APL.

Previous APL versions


Was this page helpful?

Last updated: Jun 18, 2024