<media-duration-display>

The <media-duration-display> component keeps your viewers informed about the duration of the current media loaded in the player.

This component’s primary use is intended to be display-only. Its time value will update automatically from any linked media-controller element.

<media-controller>
  <video
    playsinline muted crossorigin
    slot="media"
    src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/low.mp4"
  ></video>
  <media-duration-display></media-duration-display>
</media-controller>
NameTypeDescription
mediacontrollerstringThe element `id` of the media controller to connect to (if not nested within).

The media UI attributes will be set automatically by the controller if they are connected via nesting or the mediacontroller attribute. Only set these attributes manually if you know what you're doing.

NameTypeDescription
mediadurationstring Set to the media duration.
NameDefaultDescription
--media-duration-display-displayinline-flexdisplay property of display.
--media-primary-colorrgb(238 238 238)Default color of text.
--media-secondary-colorrgb(20 20 30 / .7)Default color of background.
--media-text-colorvar(--media-primary-color, rgb(238 238 238))color of text.
--media-control-displaydisplay property of control.
--media-control-backgroundvar(--media-secondary-color, rgb(20 20 30 / .7))background of control.
--media-control-padding10pxpadding of control.
--media-control-height24pxline-height of control.
--media-fontvar(--media-font-weight, normal) var(--media-font-size, 14px) / var(--media-text-content-height, var(--media-control-height, 24px)) var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)font shorthand property.
--media-font-weightnormalfont-weight property.
--media-font-familyhelvetica neue, segoe ui, roboto, arial, sans-seriffont-family property.
--media-font-size14pxfont-size property.
--media-text-content-heightvar(--media-control-height, 24px)line-height of text.