This use case lets authors upload arbitrary HTML/CSS/JS code to AEM that will be run un-sandboxed at the moment. This is just a proof-of-concept and is not be meant for production environments where malicious code could have severe impact on the system.
At a minimum, the feature should be limited to a single trusted author using proper ACLs.
Acme is a company that uses digital signage screens to advertise its retail products. The designers of the company are used to create complex animations for their advertisement campaigns on their website using Adobe Animate CC and also want to include these animations directly on the digital signage screens.
This how-to project walks you through how to achieve this by exporting the animation to an HTML, CSS and JS files combination and importing them using a custom component in AEM Screens.
The project has a main sequence channel that contains a custom Static Html Component to which we uploaded a zip file containing the Adobe Animate CC HTML/CSS/JS export. A dedicated servlet extracts the content of the zip file and resolves it so it can be played in the channel.
- Edit the Static HTML Content Channel
- Edit the Static Html Component and upload a zip file with your animation
- The zip file needs to have an
index.html
file at its root that runs the animation (such as an Adobe Animate CC HTML export)
- The zip file needs to have an
- Preview the channel
AEM version | Compatibility | Comments |
---|---|---|
6.3 | ✅ | |
6.4 | ✅ |
The solution uses:
- a dedicated servlet that will extract the uploaded zip file and extract the containing HTML/CSS/JS
- a custom Static Html Component that plays the extracted HTML/CSS/JS
This module requires HowTo project and is part of the install process. Follow instructions here.
If you still want to install the module individually, you can run:
mvn clean install content-package:install
- Create a screens project
- Create a new sequence channel for the master sequence
- Edit the channel and add a Static Html Component
- Configure the component and upload a zip file with the animation