@superinterface/react 2.4.3 → 2.4.5
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 +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2953,13 +2953,21 @@ var useMessageAudio = function(param) {
|
|
|
2953
2953
|
]);
|
|
2954
2954
|
var isInited = useRef5(false);
|
|
2955
2955
|
var _useState42 = _sliced_to_array(useState4(null), 2), audioEngine = _useState42[0], setAudioEngine = _useState42[1];
|
|
2956
|
+
useEffect5(function() {
|
|
2957
|
+
if (isHtmlAudioSupported) {
|
|
2958
|
+
var _Howler__howls___sounds_, _Howler__howls_;
|
|
2959
|
+
if (!(Howler === null || Howler === void 0 ? void 0 : (_Howler__howls_ = Howler._howls[0]) === null || _Howler__howls_ === void 0 ? void 0 : (_Howler__howls___sounds_ = _Howler__howls_._sounds[0]) === null || _Howler__howls___sounds_ === void 0 ? void 0 : _Howler__howls___sounds_._node)) return;
|
|
2960
|
+
Howler._howls[0]._sounds[0]._node.crossOrigin = "anonymous";
|
|
2961
|
+
}
|
|
2962
|
+
}, [
|
|
2963
|
+
audioPlayer
|
|
2964
|
+
]);
|
|
2956
2965
|
useEffect5(function() {
|
|
2957
2966
|
if (!audioPlayer.playing) return;
|
|
2958
2967
|
if (isInited.current) return;
|
|
2959
2968
|
isInited.current = true;
|
|
2960
2969
|
if (isHtmlAudioSupported) {
|
|
2961
2970
|
var audioContext = new AudioContext();
|
|
2962
|
-
Howler._howls[0]._sounds[0]._node.crossOrigin = "anonymous";
|
|
2963
2971
|
setAudioEngine({
|
|
2964
2972
|
// @ts-ignore-next-line
|
|
2965
2973
|
source: audioContext.createMediaElementSource(Howler._howls[0]._sounds[0]._node),
|