Offline Channels offline-channels

The Screens player provides offline support for the channels by using the ContentSync technology.

The players use a local http server to serve the unzipped content.

When a channel is configured to run online, the player serves the channel-resources by accessing the AEM server. However, when the channel is configured to run offline, the player serves the channel-resources from a local http server.

The workflow for the process is the following:

  1. Parse the desired pages.
  2. Collect all related assets.
  3. Package everything in a zip file.
  4. Download the zip and extract it locally.
  5. Display a local copy of the content.

Update Handlers update-handlers

The ContentSync uses update handlers to parse and collect all necessary pages and assets for a specific project. AEM Screens uses the following update handlers:

Common Options common-options

  • type: the update handler type to use
  • path: path to the resource
  • [targetRootDirectory]: target folder in the zip file
Type
Description
Options
channels
collects a channel
extension: extension of the resource to collect
[pathSuffix='']: suffix to add to the channel path
clientlib
collect the specified client library
[extension='']: can be either css or js, to collect only the former, or only the latter
assetrenditions
collect the asset renditions
[renditions=[]]: list of renditions to collect. Defaults to the original rendition
copy
copy the specified structure from the path

Testing ContentSync Configuration testing-contentsync-configuration

Follow the steps below to test the ContentSync configuration:

  1. Open https://localhost:4502/libs/cq/contentsync/content/console.html.
  2. Click your config in the list.
  3. Click Clear Cache.
  4. Click Update Cache.
  5. Click Download Full.
  6. Extract the zip file.
  7. Start a local server in the extracted folder.
  8. Open your start page and check your app status.

Enabling Offline Config for a Channel enabling-offline-config-for-a-channel

Follow the steps below to enable offline config for a channel:

  1. Inspect the channel content and check if it is requested from an AEM Instance (Online).

    chlimage_1-24

  2. Navigate to the channel dashboard.

  3. Click in the CHANNEL INFORMATION Panel.

    chlimage_1-25

  4. Navigate to the channel properties.

  5. Under the ((Channel)) tab, make sure that the checkbox is disabled, then click Save & Close.

    screen_shot_2017-12-19at122422pm

    Before content is properly deployed to the device, click the Update Offline Content.

    screen_shot_2017-12-19at122637pm

    The Offline status under PROPERTIES also updates accordingly.

    screen_shot_2017-12-19at124735pm

  6. Inspect the channel content and check if it is requested from the local Player-Cache.

    chlimage_1-26

NOTE
Learn about the template for custom offline resource handlers. And, learn more about the minimum requirements in the pom.xml for the project. See Template for Custom Handlers in Developing a Custom Component for AEM Screens.
recommendation-more-help
adce462a-f916-4dbe-9ab5-0b62cfb0f053