-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Summary
WEBM video fails to load on initial load when used in <video>
tag.
If opened directly at least once, then loads fine.
Discovered this problem in IPFS Companion, which was streaming videos from IPFS,
but I created a simplified repro without IPFS that downloads file via HTTP and produces the same error.
Tested with 2MB and 22MB files, same result for both. Steps below use 2MB file.
How to Reproduce
-
Run
demo:protocol
from myvideo-render-bug-demo
branch:git clone -b video-render-bug-demo --depth 1 https://github.com/lidel/libdweb.git cd libdweb yarn && yarn demo:protocol
-
Open
dweb://html/
first: loading via<video>
tag will fail with this error.- Looks like a race-condition of sorts related to content-type sniffing. It failed to guess content-type when video was not yet in cache. @Gozala this may be remotely related to discussion about content-type we had at DWeb: if browser could wait until API returns content-encoding, content-type along with content's asynciterator, that could solve this issue as well.
-
Open
dweb://html/video.webm
directly: it will load and play just fine. -
Open
dweb://html/
again: loading via<video>
tag will work this time.- It seems browser's content-type sniffing fails when video is not yet in cache, but works fine after initial load.
-
Open
dweb://foo/
: loading via<video>
tag from different origin will fail.- This is basically the same issue as in step 4) in Protocol Handler: SVG does not render when used in img HTML tag #54, so I guess we will follow it in Resources from different origin but same protocol should load #55
Metadata
Metadata
Assignees
Labels
No labels