File tree 2 files changed +51
-0
lines changed
2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ class App extends React.Component {
141
141
console . log ( '%c回调监听,停止播放音频' , 'color: #2196f3' )
142
142
}
143
143
recorder . onplayend = ( ) => {
144
+ console . log ( '%c回调监听,音频已经完成播放' , 'color: #2196f3' )
144
145
// 播放结束后,停止绘制canavs
145
146
this . stopDrawPlay ( ) ;
146
147
}
Original file line number Diff line number Diff line change @@ -30,3 +30,53 @@ recorder.onprogress = function(params) {
30
30
}
31
31
```
32
32
33
+ ## onplay
34
+
35
+ > 录音播放开始回调。
36
+
37
+ ``` js
38
+ recorder .onplay = () => {
39
+ console .log (' onplay' )
40
+ }
41
+ ```
42
+
43
+ ## onpauseplay
44
+
45
+ > 录音播放暂停回调。
46
+
47
+ ``` js
48
+ recorder .onpauseplay = () => {
49
+ console .log (' onpauseplay' )
50
+ }
51
+ ```
52
+
53
+ ## onresumeplay
54
+
55
+ > 录音播放恢复回调。
56
+
57
+ ``` js
58
+ recorder .onresumeplay = () => {
59
+ console .log (' onresumeplay' )
60
+ }
61
+ ```
62
+
63
+ ## onstopplay
64
+
65
+ > 录音播放停止回调。
66
+
67
+ ``` js
68
+ recorder .onstopplay = () => {
69
+ console .log (' onstopplay' )
70
+ }
71
+ ```
72
+
73
+ ## onplayend
74
+
75
+ > 录音播放完成回调。
76
+
77
+ ``` js
78
+ recorder .onplayend = () => {
79
+ console .log (' onplayend' )
80
+ }
81
+ ```
82
+
You can’t perform that action at this time.
0 commit comments