<media-seek-forward-button>

The <media-seek-forward-button> component is used to allow seeking forward a configurable amount of time, defaulting to 30 seconds.

<media-controller>
  <video
    slot="media"
    src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/low.mp4"
    playsinline
    muted
  ></video>
  <media-control-bar>
    <media-play-button></media-play-button>
    <media-time-display></media-time-display>
    <media-seek-forward-button></media-seek-forward-button>
  </media-control-bar>
</media-controller>

The seeking amount can be configured with the seekoffset attribute.

<media-controller>
  <video
    slot="media"
    src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/low.mp4"
    playsinline
    muted
  ></video>
  <media-control-bar>
    <media-play-button></media-play-button>
    <media-time-display></media-time-display>
    <media-seek-forward-button seekoffset="10"></media-seek-forward-button>
  </media-control-bar>
</media-controller>

You can modify the contents of the <media-seek-forward-button> using the icon slot. This is useful if you’d like to use your own custom icon instead of the default one provided by media-chrome.

Here’s an example of how you can replace the default icon with the word “Forward”:

<media-controller>
  <video
    slot="media"
    src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/low.mp4"
    playsinline
    muted
  ></video>
  <media-control-bar>
    <media-play-button></media-play-button>
    <media-time-display></media-time-display>
    <media-seek-forward-button>
      <span slot="icon">Forward</span>
    </media-seek-forward-button>
  </media-control-bar>
</media-controller>
NameDescription
iconThe element shown for the seek forward button’s display.
NameTypeDescription
seekoffsetstringAdjusts how much time (in seconds) the playhead should seek forward.
disabledbooleanThe Boolean disabled attribute makes the element not mutable or focusable.
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
mediacurrenttimestring Set to the current media time.
NameDefaultDescription
--media-seek-forward-button-displayinline-flexdisplay property of button.
--media-primary-colorrgb(238 238 238)Default color of text and icon.
--media-secondary-colorrgb(20 20 30 / .7)Default color of button background.
--media-text-colorvar(--media-primary-color, rgb(238 238 238))color of button text.
--media-icon-colorvar(--media-primary-color, rgb(238 238 238))fill color of button icon.
--media-control-displaydisplay property of control.
--media-control-backgroundvar(--media-secondary-color, rgb(20 20 30 / .7))background of control.
--media-control-hover-backgroundrgba(50 50 70 / .7)background of control hover state.
--media-control-padding10pxpadding of control.
--media-control-height24pxline-height of control.
--media-fontvar(--media-font-weight, bold) 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-weightboldfont-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 button text.
--media-button-icon-widthwidth of button icon.
--media-button-icon-heightvar(--media-control-height, 24px)height of button icon.
--media-button-icon-transformtransform of button icon.
--media-button-icon-transitiontransition of button icon.