Audio player
Installation
Usage
rh-audio-player
Slot Name | Description |
---|---|
series |
optional, name of podcast series |
title |
optional, title of episode |
media |
html |
about |
optional |
subscribe |
optional |
transcript |
optional |
DOM Property | Description | Type | Default |
---|---|---|---|
mediaseries |
Audio's series name, e.g. Podcast series. |
|
|
mediatitle |
Audio's title, e.g. Podcast episode title. |
|
|
layout |
Layout:
|
|
|
poster |
URL to audio's artwork |
|
|
volume |
Playback volume |
|
|
playbackRate |
Playback rate |
|
|
expanded |
|
|
|
lang |
|
|
|
colorPalette |
Element's color palette |
|
|
Method Name | Description |
---|---|
mute() |
Mutes media volume |
unmute() |
Unmutes media volume |
incrementPlaybackrate() |
Increases media playback rate by playback rate step value |
decrementPlaybackrate() |
Decreases media playback rate by playback rate step value |
pause() |
Pauses playback |
play() |
Starts or resumes playback |
seek(seconds: number) |
Seeks media to a given point in seconds |
seekFromCurrentTime(seconds: unknown) |
Seeks media a given number of secons from current elapsed time |
rewind(by: unknown) |
Rewinds media by 15 seconds (default) |
forward(by: unknown) |
Advances media by 15 seconds (default) |
None
Part Name | Description |
---|---|
panel |
expandable panel |
toolbar |
main controls |
about |
about the episode panel |
subscribe |
subscribe panel |
transcript |
transcript panel |
CSS Property | Description | Default |
---|---|---|
--rh-audio-player-background-color |
color of player background - |
var(--rh-color-surface-lightest, #ffffff)
|
--rh-audio-player-icon-background-color |
var(--rh-audio-player-background-color)
|
|
--rh-audio-player-border-color |
color of player border - |
var(--rh-color-border-subtle-on-light, #d2d2d2)
|
--rh-audio-player-secondary-text-color |
player secondary text color - |
var(--rh-color-text-secondary-on-light, #6a6e73)
|
--rh-audio-player-secondary-opacity |
player secondary opacity used for partially faded elements - |
0.75
|
--rh-audio-player-range-thumb-color |
color of time and volume range slider thumb - |
var(--rh-color-accent-brand-on-light, #ee0000)
|
--rh-tooltip-content-padding-block-start |
padding top on tooltips - |
var(--rh-space-md, 8px)
|
--rh-tooltip-content-padding-block-end |
padding bottom on tooltips - |
var(--rh-space-md, 8px)
|
--rh-tooltip-content-padding-inline-start |
padding left on tooltips - |
var(--rh-space-md, 8px)
|
--rh-tooltip-content-padding-inline-end |
padding right on tooltips - |
var(--rh-space-md, 8px)
|
rh-audio-player-about
Audio Player About Panel
Slot Name | Description |
---|---|
heading |
custom heading for panel |
|
panel content |
profile |
|
DOM Property | Description | Type | Default |
---|---|---|---|
label |
Default label content |
|
|
mediaseries |
Series this track belongs to, if applicable |
|
|
mediatitle |
Title of audio track |
|
|
Method Name | Description |
---|---|
scrollText() |
None
Part Name | Description |
---|---|
heading |
panel heading |
body |
panel body |
profile |
panel profile / avatar |
None
None
rh-audio-player-subscribe
Audio Player Subscribe Panel
Slot Name | Description |
---|---|
heading |
custom heading for panel |
|
panel content |
link |
link to subscribe to podcast |
DOM Property | Description | Type | Default |
---|---|---|---|
heading |
|
|
|
label |
|
|
Method Name | Description |
---|---|
scrollText() |
None
Part Name | Description |
---|---|
heading |
scrolling text overflow |
body |
body content slot |
links |
subscribe links |
None
None
rh-transcript
Audio Player Transcript Panel
Slot Name | Description |
---|---|
heading |
custom heading for panel |
|
|
DOM Property | Description | Type | Default |
---|---|---|---|
heading |
|
|
|
label |
|
|
|
lang |
|
|
Method Name | Description |
---|---|
setActiveCues(currentTime: unknown) |
|
setDuration(mediaDuration: number) |
|
scrollText() |
Event Name | Description |
---|---|
transcriptdownload |
Part Name | Description |
---|---|
heading |
scrolling text overflow |
toolbar |
toolbar area above cues list |
None
None
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.