Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ebellempire/voicesplayer

A customizable audio player web component designed for the Cleveland Voices project.
https://github.com/ebellempire/voicesplayer

audio-player oral-history web-components

Last synced: 12 days ago
JSON representation

A customizable audio player web component designed for the Cleveland Voices project.

Awesome Lists containing this project

README

        

# About
A custom audio player web component with support for MediaSession API, custom artwork, skip ahead/back, seek, etc. Features expand and contract based on available space.

## Basic Usage
Include the script on your page and use the `` element as follows:
```

```
## External scripting
Control external playback using the `voicesPlayerSeconds` event.
```
let seconds = 0; // time in seconds
let event = new CustomEvent("voicesPlayerSeconds", { detail: seconds});
audio.dispatchEvent(event);
```
## Customization
Some configurations may be passed as option attributes:
```

```
Some CSS variables you can set in your own stylesheet:
```
--player-font-family
--player-font-size
--player-text-color
--player-text-shadow
--player-background-color
--player-background-image
--player-padding
--player-border-radius
--player-base-height
--player-artwork-size
--player-artwork-background
--player-button-size
--player-button-background
--player-button-background_hover
--player-button-text
--player-button-text-hover
--player-button-border-radius
--player-progress-background
--player-progress-color
--player-timestamp-color
--player-timestamp-background
```
If you need more customization than this allows, you should probably create a fork.
## Notes
- Currently supports only one audio track at a time.
- Currently only supports a single codec per track so MP3 is recommended.