@94ai/nf-audio 3.3.45 → 3.3.50
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/lib/index.d.ts +52 -0
- package/lib/nf-audio.cjs.js +12 -4
- package/lib/nf-audio.esm-bundler.js +12 -4
- package/lib/nf-audio.vue.d.ts +18 -0
- package/package/nf-audio.vue +13 -5
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -10,6 +10,14 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
10
10
|
volumeValue: number;
|
|
11
11
|
speed: number;
|
|
12
12
|
}, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
13
|
+
showMoreBtn: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
showJumpToTime: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
13
21
|
audioSrc: {
|
|
14
22
|
type: StringConstructor;
|
|
15
23
|
default: string;
|
|
@@ -27,6 +35,14 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
27
35
|
default: number;
|
|
28
36
|
};
|
|
29
37
|
}>>, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
38
|
+
showMoreBtn: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
showJumpToTime: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
30
46
|
audioSrc: {
|
|
31
47
|
type: StringConstructor;
|
|
32
48
|
default: string;
|
|
@@ -44,11 +60,21 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
44
60
|
default: number;
|
|
45
61
|
};
|
|
46
62
|
}>>, {}, {
|
|
63
|
+
showMoreBtn: boolean;
|
|
64
|
+
showJumpToTime: boolean;
|
|
47
65
|
audioSrc: string;
|
|
48
66
|
backSecond: number;
|
|
49
67
|
forwardSecond: number;
|
|
50
68
|
startTime: number;
|
|
51
69
|
}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{
|
|
70
|
+
showMoreBtn: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
showJumpToTime: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
52
78
|
audioSrc: {
|
|
53
79
|
type: StringConstructor;
|
|
54
80
|
default: string;
|
|
@@ -76,6 +102,14 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
76
102
|
volumeValue: number;
|
|
77
103
|
speed: number;
|
|
78
104
|
} & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
|
|
105
|
+
showMoreBtn: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
109
|
+
showJumpToTime: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
default: boolean;
|
|
112
|
+
};
|
|
79
113
|
audioSrc: {
|
|
80
114
|
type: StringConstructor;
|
|
81
115
|
default: string;
|
|
@@ -93,6 +127,14 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
93
127
|
default: number;
|
|
94
128
|
};
|
|
95
129
|
}>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{
|
|
130
|
+
showMoreBtn: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
showJumpToTime: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
96
138
|
audioSrc: {
|
|
97
139
|
type: StringConstructor;
|
|
98
140
|
default: string;
|
|
@@ -120,12 +162,22 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
120
162
|
volumeValue: number;
|
|
121
163
|
speed: number;
|
|
122
164
|
}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {
|
|
165
|
+
showMoreBtn: boolean;
|
|
166
|
+
showJumpToTime: boolean;
|
|
123
167
|
audioSrc: string;
|
|
124
168
|
backSecond: number;
|
|
125
169
|
forwardSecond: number;
|
|
126
170
|
startTime: number;
|
|
127
171
|
}> & {
|
|
128
172
|
props: {
|
|
173
|
+
showMoreBtn: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
177
|
+
showJumpToTime: {
|
|
178
|
+
type: BooleanConstructor;
|
|
179
|
+
default: boolean;
|
|
180
|
+
};
|
|
129
181
|
audioSrc: {
|
|
130
182
|
type: StringConstructor;
|
|
131
183
|
default: string;
|
package/lib/nf-audio.cjs.js
CHANGED
|
@@ -150,6 +150,14 @@ const _sfc_main = {
|
|
|
150
150
|
moreBtn
|
|
151
151
|
},
|
|
152
152
|
props: {
|
|
153
|
+
showMoreBtn: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: true
|
|
156
|
+
},
|
|
157
|
+
showJumpToTime: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: true
|
|
160
|
+
},
|
|
153
161
|
audioSrc: {
|
|
154
162
|
type: String,
|
|
155
163
|
default: ""
|
|
@@ -367,14 +375,14 @@ var _sfc_render = function render3() {
|
|
|
367
375
|
"timeupdate": _vm.updateTime,
|
|
368
376
|
"ended": _vm.handleAudioEnded
|
|
369
377
|
}
|
|
370
|
-
}), _c("div", {
|
|
378
|
+
}), _vm.showJumpToTime ? _c("div", {
|
|
371
379
|
staticClass: "nf-fast"
|
|
372
380
|
}, [_c("i", {
|
|
373
381
|
staticClass: "iconfont icon-zanting1 nf-fast-icon",
|
|
374
382
|
on: {
|
|
375
383
|
"click": _vm.jumpToTime
|
|
376
384
|
}
|
|
377
|
-
})]), _c("div", {
|
|
385
|
+
})]) : _vm._e(), _c("div", {
|
|
378
386
|
staticClass: "nf-audio"
|
|
379
387
|
}, [_c("div", {
|
|
380
388
|
staticClass: "play",
|
|
@@ -460,7 +468,7 @@ var _sfc_render = function render3() {
|
|
|
460
468
|
},
|
|
461
469
|
expression: "volumeValue"
|
|
462
470
|
}
|
|
463
|
-
})], 1)], 1), _c("div", {
|
|
471
|
+
})], 1)], 1), _vm.showMoreBtn ? _c("div", {
|
|
464
472
|
staticClass: "option"
|
|
465
473
|
}, [_c("moreBtn", {
|
|
466
474
|
on: {
|
|
@@ -469,7 +477,7 @@ var _sfc_render = function render3() {
|
|
|
469
477
|
},
|
|
470
478
|
"speed": _vm.changeSpeed
|
|
471
479
|
}
|
|
472
|
-
})], 1)])]);
|
|
480
|
+
})], 1) : _vm._e()])]);
|
|
473
481
|
};
|
|
474
482
|
var _sfc_staticRenderFns = [];
|
|
475
483
|
var __component__ = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
|
@@ -148,6 +148,14 @@ const _sfc_main = {
|
|
|
148
148
|
moreBtn
|
|
149
149
|
},
|
|
150
150
|
props: {
|
|
151
|
+
showMoreBtn: {
|
|
152
|
+
type: Boolean,
|
|
153
|
+
default: true
|
|
154
|
+
},
|
|
155
|
+
showJumpToTime: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
default: true
|
|
158
|
+
},
|
|
151
159
|
audioSrc: {
|
|
152
160
|
type: String,
|
|
153
161
|
default: ""
|
|
@@ -365,14 +373,14 @@ var _sfc_render = function render3() {
|
|
|
365
373
|
"timeupdate": _vm.updateTime,
|
|
366
374
|
"ended": _vm.handleAudioEnded
|
|
367
375
|
}
|
|
368
|
-
}), _c("div", {
|
|
376
|
+
}), _vm.showJumpToTime ? _c("div", {
|
|
369
377
|
staticClass: "nf-fast"
|
|
370
378
|
}, [_c("i", {
|
|
371
379
|
staticClass: "iconfont icon-zanting1 nf-fast-icon",
|
|
372
380
|
on: {
|
|
373
381
|
"click": _vm.jumpToTime
|
|
374
382
|
}
|
|
375
|
-
})]), _c("div", {
|
|
383
|
+
})]) : _vm._e(), _c("div", {
|
|
376
384
|
staticClass: "nf-audio"
|
|
377
385
|
}, [_c("div", {
|
|
378
386
|
staticClass: "play",
|
|
@@ -458,7 +466,7 @@ var _sfc_render = function render3() {
|
|
|
458
466
|
},
|
|
459
467
|
expression: "volumeValue"
|
|
460
468
|
}
|
|
461
|
-
})], 1)], 1), _c("div", {
|
|
469
|
+
})], 1)], 1), _vm.showMoreBtn ? _c("div", {
|
|
462
470
|
staticClass: "option"
|
|
463
471
|
}, [_c("moreBtn", {
|
|
464
472
|
on: {
|
|
@@ -467,7 +475,7 @@ var _sfc_render = function render3() {
|
|
|
467
475
|
},
|
|
468
476
|
"speed": _vm.changeSpeed
|
|
469
477
|
}
|
|
470
|
-
})], 1)])]);
|
|
478
|
+
})], 1) : _vm._e()])]);
|
|
471
479
|
};
|
|
472
480
|
var _sfc_staticRenderFns = [];
|
|
473
481
|
var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
package/lib/nf-audio.vue.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
showMoreBtn: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
showJumpToTime: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
2
10
|
audioSrc: {
|
|
3
11
|
type: StringConstructor;
|
|
4
12
|
default: string;
|
|
@@ -26,6 +34,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
34
|
volumeValue: number;
|
|
27
35
|
speed: number;
|
|
28
36
|
}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
showMoreBtn: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
showJumpToTime: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
29
45
|
audioSrc: {
|
|
30
46
|
type: StringConstructor;
|
|
31
47
|
default: string;
|
|
@@ -43,6 +59,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
59
|
default: number;
|
|
44
60
|
};
|
|
45
61
|
}>>, {
|
|
62
|
+
showMoreBtn: boolean;
|
|
63
|
+
showJumpToTime: boolean;
|
|
46
64
|
audioSrc: string;
|
|
47
65
|
backSecond: number;
|
|
48
66
|
forwardSecond: number;
|
package/package/nf-audio.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="nf-audio-strip">
|
|
3
3
|
<audio @canplay="getDuration" controls crossOrigin="anonymous" @timeupdate="updateTime" @ended="handleAudioEnded" v-show="false" ref="audio"
|
|
4
4
|
:src="audioSrc"/>
|
|
5
|
-
<div class="nf-fast">
|
|
5
|
+
<div class="nf-fast" v-if="showJumpToTime">
|
|
6
6
|
<i class="iconfont icon-zanting1 nf-fast-icon" @click="jumpToTime" />
|
|
7
7
|
<!-- 以下是 快进/快退 功能 -->
|
|
8
8
|
<!--
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</el-slider>
|
|
52
52
|
</volumeTool>
|
|
53
53
|
</div>
|
|
54
|
-
<div class="option">
|
|
54
|
+
<div class="option" v-if="showMoreBtn">
|
|
55
55
|
<moreBtn @down="downRecord()" @speed="changeSpeed" />
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
@@ -67,6 +67,14 @@ export default {
|
|
|
67
67
|
name: "nf-audio",
|
|
68
68
|
components: { volumeTool, moreBtn },
|
|
69
69
|
props: {
|
|
70
|
+
showMoreBtn: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
showJumpToTime: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true
|
|
77
|
+
},
|
|
70
78
|
audioSrc: {
|
|
71
79
|
type: String,
|
|
72
80
|
default: ''
|
|
@@ -197,7 +205,7 @@ export default {
|
|
|
197
205
|
|
|
198
206
|
this.$once('hook:beforeDestroy', () => {
|
|
199
207
|
clearTimeout(timer)
|
|
200
|
-
|
|
208
|
+
})
|
|
201
209
|
},
|
|
202
210
|
//调整进度
|
|
203
211
|
handleMousedown() {
|
|
@@ -229,8 +237,8 @@ export default {
|
|
|
229
237
|
rangeVolume(val){
|
|
230
238
|
console.log(val);
|
|
231
239
|
},
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
/** 设置倍速播放 */
|
|
241
|
+
changeSpeed(command) {
|
|
234
242
|
const audioPlayer = this.$refs.audio
|
|
235
243
|
if (audioPlayer) {
|
|
236
244
|
audioPlayer.playbackRate = command
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-audio",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.50",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "liuxiangxiang <liuxiangxiang@94ai.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^3.3.
|
|
17
|
+
"@94ai/nf-theme-chalk": "^3.3.50",
|
|
18
18
|
"vue-demi": "^0.14.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"types": "lib/index.d.ts",
|
|
31
31
|
"main": "lib/nf-audio.cjs.js",
|
|
32
32
|
"module": "lib/nf-audio.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "85e4f8550755e534d3b2da8b16b253e848bff3e0"
|
|
34
34
|
}
|