Embedded player often gives 404 when in reveal.js

I wrote some slides in reveal.js 4 and I imported some asciinema recordings using the provided script:

The result is beautiful, but the player does not load by itself or at all (see the rendered slide).

In Firefox 77, the slide does not render at all. In Chromium 83, the slides sometimes load by themselves, but I usually need to right click and “reload element” (a few times). When it does not load, I get the following warnings in the developer tools:

A cookie associated with a cross-site resource at http://asciinema.org/ was set
without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

DevTools failed to load SourceMap: Could not load content for https://asciinema.org/js/asciinema-player.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Running the same script in a bare minimum HTML file locally, always works. The problem seems to be specific to the combination of reveal.js + asciinema.

I get the same problem both with and without async (although I don’t completely understand what it does, at least not in this case).

Any clue which direction I should look at? Any hints are appreciated.