Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holoarchivists/react-srv3
React component to render YouTube SRV3 closed captions
https://github.com/holoarchivists/react-srv3
captions react youtube
Last synced: 14 days ago
JSON representation
React component to render YouTube SRV3 closed captions
- Host: GitHub
- URL: https://github.com/holoarchivists/react-srv3
- Owner: HoloArchivists
- License: mit
- Created: 2021-03-29T13:55:44.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-02T06:51:25.000Z (almost 4 years ago)
- Last Synced: 2024-04-23T08:07:48.269Z (8 months ago)
- Topics: captions, react, youtube
- Language: TypeScript
- Homepage: https://react-srv3.vercel.app
- Size: 438 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-srv3
> React component to render YouTube SRV3 closed captions
[![NPM](https://img.shields.io/npm/v/react-srv3.svg)](https://www.npmjs.com/package/react-srv3)
[View demo](https://react-srv3.vercel.app/)
## Install
```bash
yarn add react-srv3
```## Usage
```tsx
import { CaptionsRenderer } from 'react-srv3';```
### Example
```tsx
import React from 'react';
import { CaptionsRenderer } from 'react-srv3';const VideoPlayer = () => {
const [currentTime, setCurrentTime] = React.useState(0);
const [captionsText, setCaptionsText] = React.useState('');React.useEffect(() => {
fetch('')
.then(res => res.text())
.then(setCaptionsText)
}, []);return (
setCurrentTime(e.target.currentTime)}
/>
)
}
```## License
MIT © [hizkifw](https://github.com/hizkifw)