Skip to content

Releases: lijinke666/react-music-player

v4.11.0

11 Apr 08:23
Compare
Choose a tag to compare

Features

  • support Media Session
  • support internationalization
  • add umd cjs es module output file
  • add less file support customize theme

Bug fixes

  • fix: extends content not visible in mobile

Optimize

  • refactor code
  • add some test case
  • upgrade webpack babel version

Break change

All text fields are discarded

now, please use locale field

import Locale from 'react-jinke-music-player/lib/config/locale'
// Two languages are provided by default
// one of zh_CN | en_US
<ReactJkMusicPlayer locale={Locale.zh_CN}/>
// <ReactJkMusicPlayer locale={'en_US'}/>

// Custom override
const customLocale = {
  playModeText: {
    order: '',
    orderLoop: '',
    singleLoop: '',
    shufflePlay: ''
  },
  openText: '',
  closeText: '',
  notContentText: '',
  clickToPlayText: '',
  clickToPauseText: '',
  nextTrackText: '',
  previousTrackText: '',
  reloadText: '',
  volumeText: '',
  playListsText: '',
  toggleLyricText: '',
  toggleMiniModeText: '',
  destroyText: '',
  downloadText: '',
  lightThemeText: '',
  darkThemeText: '',
  switchThemeText: '',
  removeAudioListsText: '',
  controllerTitle: '',
  emptyLyricText: '',
  clickToDeleteText: (name) => ``,
  audioTitle: ''
  // audioTitle: (audioInfo) => ``
}

<ReactJkMusicPlayer locale={customLocale}/>

// Support partial override, auto merge

<ReactJkMusicPlayer locale={{ audioTitle: "xxx" }}/>

v4.10.1

05 Mar 10:23
Compare
Choose a tag to compare

Bug Fixes

  • fix: next audio does not play if the current audio playback fails #88
  • fix: cannot click mini mode if showDestroy is false #91

v4.10.0

29 Feb 07:00
Compare
Choose a tag to compare

Features

  • enhance audio hooks

before

onAudioEnded(audioInfo)
onAudioAbort(event)
onAudioLoadError(event)

after

onAudioEnded(currentPlayId, audioLists, audioInfo)
onAudioAbort(currentPlayId, audioLists, audioInfo)
onAudioLoadError(errMsg, currentPlayId, audioLists, audioInfo)

Bug Fixes

  • fix onAudioVolumeChange typing
  • fix can't toggle play audio when seek progress bar

v4.9.0

15 Feb 10:07
Compare
Choose a tag to compare

Features

  • add audioTitle api for custom audio tag and panel title #83
  • optimize docs

Bug Fixes

  • fix cannot toggle audio volume #84
  • change defaultVolumn option range from 0-100 to 0-1 , default 100 => 1

v4.8.1

03 Feb 17:12
Compare
Choose a tag to compare

Bug Fixes

  • fix: cannot click destroy button in mini mode
  • fix: add destroy audio instance
  • fix: if not auto play, should click play button twice to play audio #78

v4.8.0

02 Feb 14:49
Compare
Choose a tag to compare

Features

  • add spaceBar api . support play / pause audio by space bar
  • add destroy feature #68
    • add onBeforeDestroy custom destroy hook
    • add onDestroyed handler
    • add showDestroy flag to control ui button display
  • add customDownloader support use custom downloader #80

v4.7.2

23 Jan 09:21
Compare
Choose a tag to compare

Bug Fixes

v4.7.1

07 Dec 13:18
Compare
Choose a tag to compare

Bug fixes

  • fix can't trigger onAudioListsChange when remove all audio list #75

v4.7.0

04 Dec 08:55
Compare
Choose a tag to compare

Features

  • add clearPriorAudioLists api support clear last audio list when audio list changed
  • add autoPlayInitLoadPlayList api support auto playing when audio list changed

Bug Fixes

  • fix onAudioPlay trigger twice
  • adjust panel close icon

now. mobile
image

pc

image

  • optimize light theme panel header background color

v4.6.1

02 Dec 07:26
Compare
Choose a tag to compare

Bug Fixes

  • fix onAudioPlay hook cannot trigger when audio track change
  • AudioInfo contains the custom field for audio lists now #73
function onAudioPlay(audioInfo) {
  console.log(audioInfo.id) // 1
  console.log(audioInfo.test) // 2
}
<ReactJkMusicPlayer audioLists={[{id:1, test: 2, ...}]}  onAudioPlay={onAudioPlay}/>
  • optimize typescript typing define