react-av-timeline 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# react-timeline
|
|
2
|
+
|
|
3
|
+
一根时间线
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install react-av-timeline
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 使用
|
|
14
|
+
|
|
15
|
+
````jsx
|
|
16
|
+
<Component items={[{
|
|
17
|
+
time:1,
|
|
18
|
+
content:'这是第一秒展示的内容'
|
|
19
|
+
},{
|
|
20
|
+
time:69,
|
|
21
|
+
content:'这是第69秒展示的内容'
|
|
22
|
+
}]}
|
|
23
|
+
currentTime={0}
|
|
24
|
+
scale={0.5}
|
|
25
|
+
totalTime={91} />
|
|
26
|
+
````
|
|
27
|
+
|
|
28
|
+
效果如图
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
# 应用
|
|
32
|
+
|
|
33
|
+
可以结合audio或video,通过监听timeupdate事件,实时更新currentTime,实现同步播放
|
|
34
|
+
|
|
35
|
+
如[example/App.tsx](example/App.tsx)或者[https://cnb.cool/arsrna/visualize-music](https://cnb.cool/arsrna/visualize-music)
|
|
36
|
+
|
|
37
|
+
# API
|
|
38
|
+
|
|
39
|
+
TODO
|