Open hpvd opened 1 year ago
bump, clarified some details in post above (via edit)
Maybe... one day... if one do not have to wait for the ws connection to be established because one use http/2+ see https://github.com/beenotung/ts-liveview/issues/13 maybe it makes sense, to
Or going even further, one also take the network speed into account and deliver a somehow reduced quality on slow networks... -> a server side approach would make this possible..
maybe this is overengineering, but maybe it's worth it ;-)
let me reply in batch:
Also, I'm working on a progressive enhanced live chatroom with ts-liveview based on the v5-auth-template, will open source it soon
In addition, I will link to a mini board game demo in the readme as well.
It seems I'll need a better way to organize / present the demos.
It would be interesting if we can go further when handling the initial GET request based on given user agent.
great to read this! Looks like we are thinking in the same direction.
for responsive images, there is a good overview in: https://css-tricks.com/a-guide-to-the-responsive-images-syntax-in-html/
Thumbhash looks interesting. I stumbeled across Blurhash before, which does something similar (with lower quality)
-> I came back to the good old base64 variant for preview (based on a low resolution variant of the image)
of this type
<img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7" alt="star" width="16" height="16">
because I was wondering about the additional size of the decoder needed to be able to use this advanced solutions (thumbhash/blurhash) on a website. Do you have any information on this?
Thumbhash really looks far advanced compared to Blurhash (quality/feature set)
regarding size, it looks like encode and decode seems to fit into 10KB ? https://github.com/evanw/thumbhash/blob/main/js/thumbhash.js
regarding Blurhash:
Update: Since writing this, I’d no longer recommend Blurhash. It requires client-side JavaScript and
this statement and an alternative approach: https://css-tricks.com/inline-image-previews-with-sharp-blurhash-and-lambda-functions/
-> is this something can also be seen using thumbhash within your ts-liveview?
for making the swap from preview to real image smooth, one can take inspiration from: https://css-tricks.com/the-blur-up-technique-for-loading-background-images/#aa-animating-the-swap
regarding todays compatibility: https://caniuse.com/?search=filter
I prefer approaches that can works without javascript. The css filter trick you just shared seems interesting 👀
would be interesting to see another type of demo page for ts-liveview: a typical real world example, a simple looking blog page, consisting of
where
the goals would be