discord-player-play-dl/src/smoothVolume.ts

13 lines
439 B
TypeScript
Raw Normal View History

2022-01-31 16:44:00 +05:00
import { VolumeTransformer as VolumeTransformerMock } from "./VoiceInterface/VolumeTransformer";
2022-01-26 00:12:52 +05:00
2022-01-31 16:44:00 +05:00
try {
// eslint-disable-next-line
const mod = require("prism-media") as typeof import("prism-media") & { VolumeTransformer: typeof VolumeTransformerMock };
if (typeof mod.VolumeTransformer.hasSmoothing !== "boolean") {
Reflect.set(mod, "VolumeTransformer", VolumeTransformerMock);
}
} catch {
/* do nothing */
}