v3.4: Formatting and performance improvements, and more!
IMPORTANT: BREAKING CHANGES:
- You will need to update your file_name_format and caption_format values for captions to work correctly (see below and the readme for more information)
- The caption_leading_zeros option has been removed (use the new formatting options for the same functionality)
- The card editor has been removed
Updates in v3.4 include:
- Implementation of the day.js library for date parsing and formatting. This will break any existing file_name_format and caption_format settings, however there are now many more options for formatting, such as days of the week, etc. See the readme for more details
- As a consequence of the new date parsing, the caption_leading_zeros option has been removed. These options are now available as formatting codes (e.g. M for 1 digit month and MM for 2 digits).
- Another consequence, you no longer need to specify any extraneous characters (e.g. camera name) in file_name_format. The library is capable of extracting just the dates from the file name.
- Added caption_format option of "AGO" which uses the fromNow() function in day.js for formatting elapsed time (e.g. "2 hours ago")
- Ensured caption_format option of " " (a space) will leave the captions blank
- Added new folder_format parameter. When your videos are stored in subfolders by date (such as Synology Surveillance Station), you can use this along with maximum_files and reverse_sort for MUCH faster load times. I.e. it will look only in the current folder for the first maximum_files files and will stop when it has enough, rather than loading from ALL folders as it did previously.
- Further tweaked loading of videos to be more streamlined which should result in more reliable loading of the card
- New options for video_autoplay, video_loop, and random_sort (thanks @mvitale1989!)
- New option for video_muted
- New options for media sources: include_images and include_video
- file_name_format, caption_format, and folder_format can be specified at the card level or entity level, with any specified entity level taking precedence.
- The popup for images is now larger. Additionally, keypresses and swipes will scroll through the images when viewing the popup
- Fixed the issue causing scrolling when setting focus on the page load (by registering the keypress globally at the document level)
- Removed the card editor. It has been broken for a while anyway, and the extra effort to update was a hurdle preventing me from getting these changes out.