Skip to content

Commit

Permalink
bump 3.7.3 and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lhz516 committed Nov 3, 2021
1 parent d7d544e commit bf2d86f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,25 @@ $rhap_time-color: #333 !default; // Font color of current time and duratio
$rhap_font-family: inherit !default; // Font family of current time and duration
```

For LESS variables, just replace `$` with `@`.
For LESS variables, just replace `$` with `@`. This library supports both.

### Status class names

There are some status class names on the audio player's wrapper div. They can be used for overwriting styles.

| className | Description |
| --------------------------- | ------------------ |
| rhap_loop--on | Loop is on |
| rhap_loop--off | Loop is off |
| rhap_play-status--paused | Paused status |
| rhap_play-status--playing | Playing status |

For example:
```scss
.rhap_play-status--paused .rhap_progress-bar {
// Overwrite the progress bar style while the audio is paused
}
```

## Advanced Usage

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-h5-audio-player",
"version": "3.7.2",
"version": "3.7.3",
"description": "A customizable React audio player. Written in TypeScript. Mobile compatible. Keyboard friendly",
"main": "./lib/index.js",
"module": "./es/index.js",
Expand Down Expand Up @@ -54,7 +54,7 @@
"bugs": {
"url": "https://github.com/lhz516/react-h5-audio-player/issues"
},
"homepage": "https://github.com/lhz516/react-h5-audio-player#readme",
"homepage": "https://codepen.io/lhz516/pen/dyGpmgP",
"peerDependencies": {
"react": "^16.3.0 || ^17.0.0",
"react-dom": "^16.3.0 || ^17.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ class H5AudioPlayer extends Component<PlayerProps> {
style,
} = this.props
const loop = this.audio.current ? this.audio.current.loop : loopProp
const loopClass = loop ? 'rhap_loop-on' : 'rhap_loop-off'
const isPlayingClass = this.isPlaying() ? 'rhap_play-status-pause' : 'rhap_play-status-playing'
const loopClass = loop ? 'rhap_loop--on' : 'rhap_loop--off'
const isPlayingClass = this.isPlaying() ? 'rhap_play-status--paused' : 'rhap_play-status--playing'

return (
/* We want the container to catch bubbled events */
Expand Down

0 comments on commit bf2d86f

Please sign in to comment.