@codebit-programando-solucoes/codebit-web-antd 1.1.48 → 1.1.49
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/dist/index.cjs +6 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1691,10 +1691,13 @@ var __webpack_exports__ = {};
|
|
|
1691
1691
|
};
|
|
1692
1692
|
const togglePlay = async ()=>{
|
|
1693
1693
|
if (!audioRef.current || !hasSource) return;
|
|
1694
|
-
if (audioRef.current.paused) {
|
|
1694
|
+
if (audioRef.current.paused) try {
|
|
1695
1695
|
await audioRef.current.play();
|
|
1696
1696
|
setIsPlaying(true);
|
|
1697
|
-
}
|
|
1697
|
+
} catch {
|
|
1698
|
+
setIsPlaying(false);
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1698
1701
|
audioRef.current.pause();
|
|
1699
1702
|
setIsPlaying(false);
|
|
1700
1703
|
}
|
|
@@ -1714,7 +1717,6 @@ var __webpack_exports__ = {};
|
|
|
1714
1717
|
if (audioRef.current && audioUrl) {
|
|
1715
1718
|
audioRef.current.pause();
|
|
1716
1719
|
audioRef.current.currentTime = 0;
|
|
1717
|
-
audioRef.current.src = audioUrl;
|
|
1718
1720
|
audioRef.current.load();
|
|
1719
1721
|
}
|
|
1720
1722
|
setIsPlaying(false);
|
|
@@ -1788,6 +1790,7 @@ var __webpack_exports__ = {};
|
|
|
1788
1790
|
}),
|
|
1789
1791
|
/*#__PURE__*/ (0, jsx_runtime.jsx)("audio", {
|
|
1790
1792
|
ref: audioRef,
|
|
1793
|
+
src: audioUrl,
|
|
1791
1794
|
onTimeUpdate: (e)=>{
|
|
1792
1795
|
if (!isPlaying) return;
|
|
1793
1796
|
const audioElement = e.target;
|