apm-react-audio-player 1.0.22 → 1.0.24
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 +1 -1
- package/dist/index.js +5 -3
- package/package.json +1 -1
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
|
-
`
|
|
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", {
|
|
@@ -390,13 +392,13 @@ var ReactAudioPlayerInner = function ReactAudioPlayerInner(props) {
|
|
|
390
392
|
className: "player-audio-type type-sm"
|
|
391
393
|
}, isLive ? /*#__PURE__*/React__default.createElement("div", {
|
|
392
394
|
className: "player-live-label"
|
|
393
|
-
},
|
|
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) {
|