apm-react-audio-player 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,7 +76,7 @@ Prop | Type | Default | Notes
76
76
  `isPlaying` | Boolean | false | Whether the audio is currently playing
77
77
  `isMuted` | Boolean | false | Whether the audio is currently muted
78
78
  `toggleMute` | Function | --- | A function to toggle the mute state
79
- `volumeControl` | Function | --- | A function to control the volume
79
+ `volumeCtrl` | Function | --- | A function to control the volume
80
80
  `currentTime` | Number | null | The current time of the audio track
81
81
  `duration` | Number | null | The duration of the audio track
82
82
  `rewindControl` | Function | --- | A function to rewind the audio track
package/dist/index.js CHANGED
@@ -294,7 +294,9 @@ var ReactAudioPlayerInner = function ReactAudioPlayerInner(props) {
294
294
  isMuted = props.isMuted,
295
295
  formatCalculateTime = props.formatCalculateTime,
296
296
  rewindControl = props.rewindControl,
297
- forwardControl = props.forwardControl;
297
+ forwardControl = props.forwardControl,
298
+ subtitle = props.subtitle,
299
+ prefix = props.prefix;
298
300
  var audioDuration = duration && !isNaN(duration) && calculateTime(duration);
299
301
  var formatDuration = duration && !isNaN(duration) && audioDuration && formatCalculateTime(audioDuration);
300
302
  return audioSrc && /*#__PURE__*/React__default.createElement("div", {
@@ -386,17 +388,17 @@ var ReactAudioPlayerInner = function ReactAudioPlayerInner(props) {
386
388
  style: customStyles && customStyles.duration
387
389
  }, duration && !isNaN(duration) && calculateTime(duration))))), /*#__PURE__*/React__default.createElement("div", {
388
390
  className: "player-content"
389
- }, customHtml && customHtml, /*#__PURE__*/React__default.createElement("div", {
391
+ }, customHtml && customHtml, console.log('🟢: REACT-AUDIO-PLAYER'), console.log('prefix', prefix), /*#__PURE__*/React__default.createElement("div", {
390
392
  className: "player-audio-type type-sm"
391
393
  }, isLive ? /*#__PURE__*/React__default.createElement("div", {
392
394
  className: "player-live-label"
393
- }, "On Air") : /*#__PURE__*/React__default.createElement("div", {
395
+ }, prefix ? prefix : 'On Air') : /*#__PURE__*/React__default.createElement("div", {
394
396
  className: "player-label"
395
397
  }, "listen", /*#__PURE__*/React__default.createElement("div", {
396
398
  className: "player-label-duration"
397
399
  }, "[".concat(formatDuration, "]"))), /*#__PURE__*/React__default.createElement("div", {
398
400
  className: "player-title"
399
- }, title || '', " ")))));
401
+ }, title || '', " ", subtitle && "by ".concat(subtitle), ' ')))));
400
402
  };
401
403
 
402
404
  var ReactAudioPlayer = function ReactAudioPlayer(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apm-react-audio-player",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "author": "Jason Phan <jphan@mpr.org>",
5
5
  "license": "MIT",
6
6
  "private": false,