Improve <video> and <audio> elements
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 4.5k
- Forks
- 226
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 4
Description
From what I saw, most developers prefer third-party players (video.js, Plyr, etc.) over native <video> and <audio> elements for two reasons:
- style player
- add controls
Off the top of my head:
-
The speed of the audio/video playback can be set only via
playbackRateproperty:document.getElementById('player').playbackRate = 0.5. Why not to expose it as UI control? -
Whether the audio/video should start playing over again when it's finished can be set only via
loopproperty:document.getElementById('player').loop = trueor vialoopattribute:<video src="test.webm" loop>. Why not to expose it as UI control? -
There's no UI for switching sources (e.g. audio sources in different languages, video sources in different resolutions).
-
The
<source>element has nosrclangandlabelattrubutes unlike<track>element. You can't do something like:
<video width="320" height="240" controls>
<source src="forrest_gump_480.mp4" type="video/mp4" label="480p">
<source src="forrest_gump_1080.mp4" type="video/mp4" label="1080p" default>
<source src="forrest_gump_en.ogg" type="audio/ogg" srclang="en" label="English" default>
<source src="forrest_gump_no.ogg" type="audio/ogg" srclang="no" label="Norwegian">
<track src="fgsubtitles_en.vtt" kind="subtitles" srclang="en" label="English" default>
<track src="fgsubtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian">
</video>
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 by reviewing the native and elements and their existing controls, especially the playbackRate and loop properties and the entries shown in the issue. The proposal spans playback controls, source selection, and new source metadata, so the relevant specification entry points and a concrete scope must be established before implementation; done criteria are not defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100