From ff05419df1e084b86d151e7988c374cfdf7887aa Mon Sep 17 00:00:00 2001 From: streamich Date: Mon, 29 Oct 2018 21:12:26 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20add=20useVideo=20hoo?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/useAudio.md | 2 +- docs/useVideo.md | 87 ++++++++++++++ src/__stories__/useVideo.story.tsx | 36 ++++++ src/index.ts | 2 + src/useAudio.ts | 176 +--------------------------- src/useVideo.ts | 5 + src/util/createHTMLMediaHook.ts | 182 +++++++++++++++++++++++++++++ 8 files changed, 316 insertions(+), 175 deletions(-) create mode 100644 docs/useVideo.md create mode 100644 src/__stories__/useVideo.story.tsx create mode 100644 src/useVideo.ts create mode 100644 src/util/createHTMLMediaHook.ts diff --git a/README.md b/README.md index 2270830f..637eab3c 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ - [**UI**](./docs/UI.md) - [`useAudio`](./docs/useAudio.md) — plays audio and exposes its controls. [![][img-demo]](https://codesandbox.io/s/5v7q47knwl) - [`useSpeech`](./docs/useSpeech.md) — synthesizes speech from a text string. [![][img-demo]](https://codesandbox.io/s/n090mqz69m) + - [`useVideo`](./docs/useVideo.md) — plays video, tracks its state, and exposes playback controls.

- [**Animations**](./docs/Animations.md) diff --git a/docs/useAudio.md b/docs/useAudio.md index 206681a7..6f74730c 100644 --- a/docs/useAudio.md +++ b/docs/useAudio.md @@ -1,6 +1,6 @@ # `useAudio` -Creates `