Scrubs finite media time and submits the current time as a numeric form value.
<nve-media-controller id="time-example" style="max-width: 300px">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="time-example" name="currentTime"></nve-media-time-range>
</nve-media-controller>
<nve-media-controller id="time-example" style="max-width: 300px">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="time-example" name="currentTime"></nve-media-time-range>
</nve-media-controller>
Installation
<script type="module">
import '@nvidia-elements/media/time-range/define.js';
</script>
<nve-media-controller id="time-example" style="max-width: 300px">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="time-example" name="currentTime"></nve-media-time-range>
</nve-media-controller>
<script type="module">
import '@nvidia-elements/media/time-range/define.js';
</script>
<nve-media-controller id="time-example" style="max-width: 300px">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="time-example" name="currentTime"></nve-media-time-range>
</nve-media-controller>
nve api.get nve-media-time-range
nve api.get nve-media-time-range
Usage
nve-media-time-range sends --seek on user input and syncs its value and bounds from the target controller's mediaState events.
<nve-media-controller id="controller">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="controller" name="currentTime"></nve-media-time-range>
</nve-media-controller>
<nve-media-controller id="controller">
<video src="/static/video/particle.mp4" playsinline></video>
<nve-media-time-range commandfor="controller" name="currentTime"></nve-media-time-range>
</nve-media-controller>
Buffered Ranges
When connected to a media controller, the time range renders each span from mediaState.buffered behind the played progress. The spans use media time in seconds and can contain gaps. Controller state takes precedence over buffered-ranges while the time range has a valid command target.
<nve-media-time-range
min="0"
max="60"
value="16"
buffered-ranges='[{"start":0,"end":22},{"start":31,"end":48}]'
></nve-media-time-range>
<nve-media-time-range
min="0"
max="60"
value="16"
buffered-ranges='[{"start":0,"end":22},{"start":31,"end":48}]'
></nve-media-time-range>
Release Status
All elements and features go through 3 phases of stability, pre-release, beta and stable.
pre-release Docs Preview API Documentation Fully Themeable
beta Robust unit test coverages Passed API Review Passed Designer VQA Review Included in library package stable No known outstanding AA WCAG issues No known outstanding performance issues Adapts to different screen/container sizes No breaking API changes for at least 90 days