Closed bpevs closed 1 year ago
oh btw, I don't think I can add reviewers, but @sirodoht ^ No rush, just tagging because I don't trust github notifications
Hey! That looks good, thanks!
@bpevs It should be working, I looked at the audio element you have there and it includes the preload="metadata"
attribute.
Thanks! I see it as well!
Background
Basically, for blog posts with heavy media content, it's a large load for a visitor to immediately download a lot of media.
The preload attribute lets us do things like:
<video preload="none" />
: don't load until the visitor presses play<audio preload="metadata" />
: only load metadata, and load the actual audio media when the visitor presses playI worked around this for the heaviest files by adding media via iframe, but this isn't really optimal for all the audio examples I have in these posts.
Changes
NOTE: I didn't test this or clone to my computer or anything, and didn't look too hard at the repo, so I'm not sure if there are other requirements here.