feat(html): add data-availability to volume slider (#1001)

This commit is contained in:
rahim
2026-03-18 12:44:12 -07:00
committed by GitHub
parent c738498312
commit c95e1343e1
5 changed files with 26 additions and 8 deletions
@@ -1,4 +1,4 @@
import { SliderDataAttrs, VolumeSliderCore } from '@videojs/core';
import { VolumeSliderCore, VolumeSliderDataAttrs } from '@videojs/core';
import {
applyElementProps,
applyStateDataAttrs,
@@ -120,12 +120,12 @@ export class VolumeSliderElement extends MediaElement {
applyStyles(this, cssVars);
// Apply data attributes to root.
applyStateDataAttrs(this, state, SliderDataAttrs);
applyStateDataAttrs(this, state, VolumeSliderDataAttrs);
// Provide context to child elements.
this.#provider.setValue({
state,
stateAttrMap: SliderDataAttrs,
stateAttrMap: VolumeSliderDataAttrs,
pointerValue: this.#core.valueFromPercent(state.pointerPercent),
thumbAttrs: this.#core.getAttrs(state),
thumbProps: this.#slider.thumbProps,