react-hifi
Version:
A set of react components wich provides simple abstraption to manipulate HTML5 AudioContext API (Equalizer, visualisation, stereo, basic controls)
23 lines • 852 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var plugin_factory_1 = require("../_lib/plugin-factory");
var StereoPlugin = /** @class */ (function () {
function StereoPlugin() {
}
StereoPlugin.prototype.shouldNotUpdate = function (prevProps, nextProps) {
return prevProps.value === nextProps.value;
};
StereoPlugin.prototype.createNode = function (audioContext, _a) {
var value = _a.value;
return new StereoPannerNode(audioContext, { pan: value });
};
StereoPlugin.prototype.updateNode = function (_a, _b) {
var pan = _a.pan;
var value = _b.value;
pan.value = value;
};
return StereoPlugin;
}());
exports.StereoPlugin = StereoPlugin;
exports.default = plugin_factory_1.pluginFactory(new StereoPlugin());
//# sourceMappingURL=index.js.map