use-audiate
TypeScript icon, indicating that this package has built-in type declarations

1.0.22 • Public • Published

use-audiate

semantic-release npm Build Status

What is this?

A React hook to detect and enable auto-playing audio content if it has been blocked by Chrome's autoplay policy.

Installation

yarn add use-audiate

Usage

import React from "react";
import { useAudiate } from "use-audiate";
 
const App: React.FC = () => {
  const [audioContextState, isEnabled] = useAudiate();
  return (
    <pre>
      <code>{JSON.stringify({ audioContextState, isEnabled })}</code>
    </pre>
  );
};

Readme

Keywords

none

Package Sidebar

Install

npm i use-audiate

Weekly Downloads

0

Version

1.0.22

License

MIT

Unpacked Size

2.99 kB

Total Files

3

Last publish

Collaborators

  • dzuc