Some suggestions while playing with your node:
Line 505 in ui_media.js,
margin: 0, auto is invalid CSS. You probably want to remove the comma.
Lines 281-282 could be replaced with
res.sendFile(pathImage); as it would then use an appropriate MIME type instead of
media/* (except if creating a stream has any advantage over sendFile when serving a video ? then I would check the file extension and set the appropriate MIME type accordingly).
Line 89, add
svg in your regex and now your node also supports svg files (these need to be served with
res.sendFile() though -- don't know why)
If the CSS of the
div enclosing the
img was set to
display:grid you could use
align-items properties and propose to the users of your node the ability to justify/align the image within the
div (all 9 positions) and even stretch it ! Probably more easily than with the switch/case you used for the adjust/center/expand/side options.
Lines 603-612 of ui_media.js: find a way to move this style to the
<head> section of the dashboard to avoid unneeded repetition. Also use another selector than just
video as this will target all
<video> tags on the dashboard, including those that would have been added using an ui_template node for instance.
Line 475 of ui_media.js: same as above; move the script to the
<head> section so it appears only once in the source file of the dashboard and use an inline onclick in your HTML like
That's all for now ! Great work !