UNPKG

react-native-audio-api

Version:

react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification

17 lines (16 loc) 593 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AudioComponentContext = void 0; exports.useAudioTagContext = useAudioTagContext; var _react = require("react"); const AudioComponentContext = exports.AudioComponentContext = /*#__PURE__*/(0, _react.createContext)(undefined); function useAudioTagContext() { const context = (0, _react.useContext)(AudioComponentContext); if (context === undefined) { throw new Error('useAudioTagContext must be used within an <Audio> component.'); } return context; } //# sourceMappingURL=AudioTagContext.js.map