It turns out the coding work was much simpler than I first thought! I guess its because my existing code was so well written !
It only took a few small changes to existing pieces of code to add a “zoom” range slider, initialize it and handle “change” events, and always display the canvas as the “preview” element so the zoom effect can be seen before taking a snapshot.
Note that while the zoom level as well as the previously-existing “effects” select list options (i.e., grayscale, blur, etc.) are shown in the canvas preview element, they are only applied when saving still image snapshots, but not when saving video streams. This is due to a limitation of the browser’s media device “recorder” object, which directly captures the content from the media stream object, rather than the rendered canvas object.
You can get the latest update here: TiddlyTools/Widgets/action-camera.js
Give it a try and let me know what you think…
enjoy,
-e