funny javascript-optional bluesky web frontend

https://anartia.kelinci.net/did:plc:z72i7hdynmk6r22z27h6tvur

@bsky.app — Anartia

i want to get the video player working, i'll just have to figure out how to vendor hls.js

i think the right approach might just be to:

  • have a CSR-rendered page where it's just the video player taking up the whole page
  • when JS is disabled, show a banner indicating that it's required for HLS playback, but make the thumbnail a link to that video player page (not sure, but it might be good for archived pages)
  • when JS is loaded, intercept clicks to that link, replace it with an iframe

this solves my problem of trying to vendor HLS.js.

see, the way I've made these pages have minimal JavaScript is that I've purposefully disabled SvelteKit's client-side rendering functionality. (I've also heavily modified SvelteKit's build output to get rid of those <!-- --> HTML comments serving as hydration markers, we don't need those.)

to get sprinkles of interactivity (e.g. relative time, I think they're useful), I have a wrapper component that adds in <script> elements that link to JS snippets placed in the static assets directory.

I could get HLS.js to work, but I'd need to have a separate esbuild step that would vendor the library as a single file, where I could then consume as a JS snippet.

yeah I'm not gonna do that.

almost went for Alpine.js for interactivity, could also go for rini's Anguish.js since it's smaller and does mostly what I want, but honestly a lot of these interactivity is pretty simple atm ^-^
don't think there's any way to make banners not so bright is there, short of like, darkening it and undarkening it on hover (which seems like a bad idea)
@mary_ext In most cases brightening things on hover is a hint that the thing can be clicked for some further action so... probably best to not do that?