Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
// Module ID: 16861
|
|
// Function ID: 16862
|
|
// Name: useSoundboardSoundPlayer
|
|
// Dependencies: [19, 5312, 9095, 2020, 16862, 504, 6757, 2]
|
|
// Exports: default
|
|
|
|
// Module 16861 (useSoundboardSoundPlayer)
|
|
import SoundboardUtils from "SoundboardUtils" /* 6757 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import SoundboardStore from "SoundboardStore" /* 5312 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const SoundOutputChannel = fn(9095).SoundOutputChannel;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/soundboard/useSoundboardSoundPlayer.native.tsx");
|
|
|
|
export default function useSoundboardSoundPlayer(arg0, arg1) {
|
|
_require = arg0;
|
|
importDefault = arg1;
|
|
if (arg2 === undefined) {
|
|
const SoundboardSettings = require("UserSettings").SoundboardSettings;
|
|
const setting = SoundboardSettings.getSetting();
|
|
let volume;
|
|
if (setting != null) {
|
|
volume = setting.volume;
|
|
}
|
|
}
|
|
if (arg3 === undefined) {
|
|
const DEFAULT = SoundOutputChannel.DEFAULT;
|
|
}
|
|
audioRef = undefined;
|
|
audioRef = noop.useContext(require("SoundPlayerContext")).audioRef;
|
|
const items = [SoundboardStore];
|
|
const items1 = [arg0];
|
|
const obj2 = { playSoundboardSound: null, isPlayingSound: null, previewSound: null, isPreviewingSound: false };
|
|
const items2 = [arg0, audioRef, arg1];
|
|
const stateFromStores = require("initialize").useStateFromStores(items, () => SoundboardStore.isPlayingSound(soundId.soundId), items1);
|
|
obj2.playSoundboardSound = noop.useCallback((arg0) => {
|
|
if (null != audioRef.current) {
|
|
const current = audioRef.current;
|
|
current.pause();
|
|
}
|
|
if (null != closure_1) {
|
|
SoundboardUtils.playSound(closure_0, tmp2, arg0);
|
|
}
|
|
}, items2);
|
|
obj2.isPlayingSound = stateFromStores;
|
|
obj2.previewSound = function previewSound() {
|
|
return Promise.resolve();
|
|
};
|
|
return obj2;
|
|
};
|