thi-ng / umbrella

⛱ Broadly scoped ecosystem & mono-repository of 198 TypeScript projects (and ~175 examples) for general purpose, functional, data driven development
https://thi.ng
Apache License 2.0
3.31k stars 144 forks source link

refactor(examples): restructure/refactor/simplify canvas-recorder example #412

Closed postspectacular closed 9 months ago

postspectacular commented 9 months ago

cc @nclslbrn

postspectacular commented 9 months ago

@nclslbrn Forgot to mention: I also updated the mime type for the canvas recorder (link), since the current default isn't supported by Firefox (only Chrome). Safari does only seem to support video/mp4;codecs="AVC1.4d002a,mp4a.40.1" but none of the WebM containers/codecs (so recording won't currently work there). Will add some detection function to the thi.ng/dl-asset package and then update this example later...

nclslbrn commented 9 months ago

@postspectacular thanks, that's a huge refactoring, especially to put all the grid variations in state. I tried to put the UI (buttons) and canvas in the same render/compute function but without success, I'm glad I know how to do it now.

I had seen this Codec problem but I didn't know if it was a choice to use a particular Codec (for better rendering) or a bug.