constructing new VideoFrame(HTMLVideoElement,...) shouldn't rely on <video>.networkState
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Right now the constructor's steps say
If image’s networkState attribute is NETWORK_EMPTY, then throw an InvalidStateError DOMException.
This was a copy paste from createImageBitmap() steps.
But networkState really doesn't have any correspondence to "is your video element ready to render a frame".
There's a related discussion in Chrome's bug tracker where play() promise resolution (and thereby readyState > HAVE_CURRENT_DATA) is proposed as the signal that a frame is ready. Some unanswered questions there, and maybe some risk to making that change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the VideoFrame(HTMLVideoElement,...) constructor steps and compare the NETWORK_EMPTY requirement with the referenced createImageBitmap() steps. Review the linked Chrome discussion about play() resolution and readyState; done means the readiness signal is resolved and the constructor steps are updated accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, audio-video-rtc
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100