Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/murrayee/usevideostate

初始化视频状态
https://github.com/murrayee/usevideostate

Last synced: about 18 hours ago
JSON representation

初始化视频状态

Awesome Lists containing this project

README

        

# react-hooks react-usevideostate

**react-usevideostate** 初始化 video 属性以及事件绑定

## Installation

```bash
# with NPM
npm install react-usevideostate --save-dev

# with Yarn
yarn add react-usevideostate
```

## Usage

```jsx
import useVideoState from "react-usevideostate";

const Example = () => {
const videoRef = useRef(null);
const videoState = useVideoState(videoRef);
useEffect(() => {
console.log(videoState);
}, [videoState]);

return (




);
};
```