Skip to content
Enact

limestone/MediaPlayer

Set of Limestone-styled components to support a custom media player.

A set of components for controlling media playback and rendering additional components.

This uses ui/Slottableui/Slottable to accept the custom tags, <bottomComponents> to add components to the bottom of the media controls. Any additional children will be rendered into the "more" controls area. Showing the additional components is handled by MediaControls when the user navigates down from the media buttons.

Wrapped with: ui/Cancelableui/Cancelable.Cancelable
Wrapped with: limestone/Skinnablelimestone/Skinnable.Skinnable

Properties

DOM id for the component.

This child component ActionGuide's id is generated from the id.


The aria-label for the action guide.

When the media has been loaded first, this aria-label is read after media title. You can use this aria-label to guide the user to find the action guide button for more controls.


String

The aria-label for the action guide button.

This aria-label is read when the action guide button is focused.


Disables the ActionGuide.


The label for the action guide.


These components are placed below the action guide. Typically, these will be media playlist controls.


The aria-label for the jumpBackward button.


Jump backward limestone/Iconlimestone/Icon.Icon name. Accepts any limestone/Iconlimestone/Icon.Icon component type.

Default: 'jumpbackward'

Disables state on the media "jump" buttons; the outer pair.


The aria-label for the jumpForward button.


Jump forward limestone/Iconlimestone/Icon.Icon name. Accepts any limestone/Iconlimestone/Icon.Icon component type.

Default: 'jumpforward'

ObjectFunction

Called with the reference to the mediaControls node.


Disables the media buttons.


Boolean

When true, more components are rendered. This does not indicate the visibility of more components.


String

The spotlight ID for the moreComponent container.

Default: 'moreComponents'

The aria-label for the next button.


Disables the next button.


Next limestone/Iconlimestone/Icon.Icon name. Accepts any limestone/Iconlimestone/Icon.Icon component type.

Default: 'next'

Removes the "jump" buttons. The buttons that skip forward or backward in the video.


Removes the next button. The button that plays the next video of the playlist.


Removes the previous button. The button that plays the previous video of the playlist.


Function

Called when the button in ActionGuide is clicked.


Called when cancel/back key events are fired.


Function

Called when the user clicks the JumpBackward button


Function

Called when the user clicks the JumpForward button.


Function

Called when the user presses a media control button.


Called when the user clicks the next button.

If this function is not set, the button will work as the default jumpForward button. Next button will be the default in 2.0.0.


Called when the user clicks the Play button.


Function

Called when the user clicks the previous button

If this function is not set, the button will work as the default jumpBackward button. Previous button will be the default in 2.0.0.


true when the video is paused.


A string which is sent to the pause icon of the player controls. This can be anything that is accepted by limestone/Iconlimestone/Icon.Icon. This will be temporarily replaced by the limestone/MediaPlayerlimestone/MediaPlayer.MediaControls.playIcon when the limestone/MediaPlayerlimestone/MediaPlayer.MediaControls.paused boolean is false.

Default: 'pause'

A string which is sent to the play icon of the player controls. This can be anything that is accepted by limestone/Iconlimestone/Icon.Icon. This will be temporarily replaced by the limestone/MediaPlayerlimestone/MediaPlayer.MediaControls.pauseIcon when the limestone/MediaPlayerlimestone/MediaPlayer.MediaControls.paused boolean is true.

Default: 'play'

Boolean

Disables the media "play"/"pause" button.


The aria-label for the previous button.


Boolean

Disables the previous button.


Previous limestone/Iconlimestone/Icon.Icon name. Accepts any limestone/Iconlimestone/Icon.Icon component type.

Default: 'previous'

true controls are disabled from Spotlight.


The spotlight ID for the media controls container.

Default: 'mediaControls'

The visibility of the component. When false, the component will be hidden.

Default: true

A customized slider suitable for use within media player components such as limestone/VideoPlayerlimestone/VideoPlayer.VideoPlayer.

Extends: limestone/Sliderlimestone/Slider.Slider

Properties

When true, the knob will expand. Note that Slider is a controlled component. Changing the value would only affect pressed visual and not the state.


Allow moving the knob via pointer or 5-way without emitting onChange events

Default: false

The position of the knob when in preview mode


The visibility of the component. When false, the component will be hidden.

Default: true

Limestone-styled formatted time component.

Properties

An instance of a Duration Formatter from i18n.

Must have a format() method that returns a string.


The current time in seconds of the video source.

Default: 0

Checks if current time and total time should include the hour.

Default: false

Removes the current time.


Removes the total time.


The total time (duration) in seconds of the loaded video source.

Default: 0
3 Params
secondsNumber | String

A duration of time represented in seconds

durfmtDurationFmt

An instance of a ilib.DurationFmt object from iLib configured to display time

configObject

Additional configuration object that includes includeHour

Returns
String

Formatted duration string