Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/murrayee/usevideostate
初始化视频状态
https://github.com/murrayee/usevideostate
Last synced: about 18 hours ago
JSON representation
初始化视频状态
- Host: GitHub
- URL: https://github.com/murrayee/usevideostate
- Owner: murrayee
- Created: 2020-04-28T00:54:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T04:00:58.000Z (8 months ago)
- Last Synced: 2024-10-18T01:54:11.058Z (20 days ago)
- Language: TypeScript
- Size: 64.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 (
);
};
```