Objective: A persistent audio player. User should be able to navigate the page, while the audio player is playing.
- If there is any JS code that attaches handlers after DOM loads, it has to re-attach them on
newspack-app-shell-ready
- CSS transitions can be added by utilising the
newspack-app-shell-transitioning
class that is added to the body element while page is transitioning. - If theme is using the AMP-WP plugin, the AMP plugin should be run in Transitional mode, because AMP will not allow the custom script on AMP pages.
Based on work done in AMP-WP plugin. The scope of this work is bigger that what we want to achieve here. In the future the Newspack App Shell plugin might be abandoned in favour of the App Shell feature of AMP-WP plugin.