Closed juliankoehn closed 1 year ago
The following events can be sent via sockets:
SCREENSAVER_REGISTER
(ws.MessageKey = "screensaver.register")SCREENSAVER_REFRESH
(ws.MessageKey = "screensaver.refresh")SCREENSAVER_DISABLE
(ws.MessageKey = "screensaver.disable")SCREENSAVER_SHOW
(ws.MessageKey = "screensaver.show")Caching of screensaver content in RAM is still pending and will be implemented in a subsequent iteration.
Player: Edge Player installed on Ubuntu Core 22 Content: Screensaver activated in the Admin Panel with website content (video)
Set up a new player with Ubuntu Core 22 and Edge Player installed. In the Admin Panel, activate the screensaver with website content (video). Play the video in full length and observe the screensaver. Interact with the mouse or keyboard and observe the screensaver behavior.
The video played in a loop as expected. The screensaver was reset when interacting with the mouse or keyboard.
The Screensaver Support for Website Content Type has been implemented successfully and tested successfully. The screensaver behaves as expected and resets when interacting with the mouse or keyboard.
User Story
As a user of the Digital Signage Player, I want to be able to cache the screensaver content in RAM so that it can be played smoothly and quickly.
Acceptance Criteria
Example Code
In the above example, the cacheScreensaver function first checks if the screensaver content is already cached in the cache map. If it is, it updates the expiration time and returns the cached data. If not, it fetches the content from the given URL, caches it in the cache map, and returns the newly fetched data. The cache data's expiration time is set to the current time plus 72 hours. The cache data is stored in a map, with a key generated by hashing the URL. A function named invalidateCache is provided to allow invalidation of cache data for a given URL. The cache garbage collector function, runCacheGC, periodically runs to remove any cache data that has exceeded its expiration time.
Testing