@94ai/nf-audio 3.3.68 → 3.3.69
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/nf-audio.cjs.js +11 -5
- package/lib/nf-audio.esm-bundler.js +11 -5
- package/package/nf-audio.vue +11 -5
- package/package.json +3 -3
package/lib/nf-audio.cjs.js
CHANGED
|
@@ -35,7 +35,7 @@ const _sfc_main = {
|
|
|
35
35
|
},
|
|
36
36
|
unloadTip: {
|
|
37
37
|
type: String,
|
|
38
|
-
default: "
|
|
38
|
+
default: "音频资源暂无法播放"
|
|
39
39
|
},
|
|
40
40
|
disabled: {
|
|
41
41
|
type: Boolean,
|
|
@@ -373,7 +373,7 @@ const _sfc_main = {
|
|
|
373
373
|
},
|
|
374
374
|
betweenPlay() {
|
|
375
375
|
if (!this.disabled) {
|
|
376
|
-
if (this.
|
|
376
|
+
if (this.checkAudioEffectNull()) {
|
|
377
377
|
nfMessage.Message.warning(this.unloadTip);
|
|
378
378
|
this.paused = true;
|
|
379
379
|
this.betweenPlaying = false;
|
|
@@ -400,7 +400,7 @@ const _sfc_main = {
|
|
|
400
400
|
//点击进度条更新进度
|
|
401
401
|
clickProgress(e) {
|
|
402
402
|
if (!this.disabled) {
|
|
403
|
-
if (this.
|
|
403
|
+
if (this.checkAudioEffectNull()) {
|
|
404
404
|
if (!this.paused) {
|
|
405
405
|
nfMessage.Message.warning(this.unloadTip);
|
|
406
406
|
}
|
|
@@ -422,7 +422,7 @@ const _sfc_main = {
|
|
|
422
422
|
//鼠标弹起
|
|
423
423
|
handleMouseup() {
|
|
424
424
|
if (!this.disabled) {
|
|
425
|
-
if (this.
|
|
425
|
+
if (this.checkAudioEffectNull()) {
|
|
426
426
|
nfMessage.Message.warning(this.unloadTip);
|
|
427
427
|
this.paused = true;
|
|
428
428
|
this.betweenPlaying = false;
|
|
@@ -443,6 +443,9 @@ const _sfc_main = {
|
|
|
443
443
|
//调整进度
|
|
444
444
|
handleMousedown() {
|
|
445
445
|
if (!this.disabled) {
|
|
446
|
+
if (this.checkAudioEffectNull()) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
446
449
|
this.pauseAudio();
|
|
447
450
|
this.paused = true;
|
|
448
451
|
this.betweenPlaying = false;
|
|
@@ -481,10 +484,13 @@ const _sfc_main = {
|
|
|
481
484
|
this.$refs.progressBar.style.left = MoveX - this.$refs.progressBar.clientWidth / 2 + "px";
|
|
482
485
|
}
|
|
483
486
|
},
|
|
487
|
+
checkAudioEffectNull() {
|
|
488
|
+
return this.audio.duration === 0 || Number.isNaN(this.audio.duration);
|
|
489
|
+
},
|
|
484
490
|
jumpToTime(time) {
|
|
485
491
|
if (!this.disabled) {
|
|
486
492
|
this.pauseAudio();
|
|
487
|
-
if (this.
|
|
493
|
+
if (this.checkAudioEffectNull()) {
|
|
488
494
|
nfMessage.Message.warning(this.unloadTip);
|
|
489
495
|
this.paused = true;
|
|
490
496
|
this.betweenPlaying = false;
|
|
@@ -33,7 +33,7 @@ const _sfc_main = {
|
|
|
33
33
|
},
|
|
34
34
|
unloadTip: {
|
|
35
35
|
type: String,
|
|
36
|
-
default: "
|
|
36
|
+
default: "音频资源暂无法播放"
|
|
37
37
|
},
|
|
38
38
|
disabled: {
|
|
39
39
|
type: Boolean,
|
|
@@ -371,7 +371,7 @@ const _sfc_main = {
|
|
|
371
371
|
},
|
|
372
372
|
betweenPlay() {
|
|
373
373
|
if (!this.disabled) {
|
|
374
|
-
if (this.
|
|
374
|
+
if (this.checkAudioEffectNull()) {
|
|
375
375
|
Message.warning(this.unloadTip);
|
|
376
376
|
this.paused = true;
|
|
377
377
|
this.betweenPlaying = false;
|
|
@@ -398,7 +398,7 @@ const _sfc_main = {
|
|
|
398
398
|
//点击进度条更新进度
|
|
399
399
|
clickProgress(e) {
|
|
400
400
|
if (!this.disabled) {
|
|
401
|
-
if (this.
|
|
401
|
+
if (this.checkAudioEffectNull()) {
|
|
402
402
|
if (!this.paused) {
|
|
403
403
|
Message.warning(this.unloadTip);
|
|
404
404
|
}
|
|
@@ -420,7 +420,7 @@ const _sfc_main = {
|
|
|
420
420
|
//鼠标弹起
|
|
421
421
|
handleMouseup() {
|
|
422
422
|
if (!this.disabled) {
|
|
423
|
-
if (this.
|
|
423
|
+
if (this.checkAudioEffectNull()) {
|
|
424
424
|
Message.warning(this.unloadTip);
|
|
425
425
|
this.paused = true;
|
|
426
426
|
this.betweenPlaying = false;
|
|
@@ -441,6 +441,9 @@ const _sfc_main = {
|
|
|
441
441
|
//调整进度
|
|
442
442
|
handleMousedown() {
|
|
443
443
|
if (!this.disabled) {
|
|
444
|
+
if (this.checkAudioEffectNull()) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
444
447
|
this.pauseAudio();
|
|
445
448
|
this.paused = true;
|
|
446
449
|
this.betweenPlaying = false;
|
|
@@ -479,10 +482,13 @@ const _sfc_main = {
|
|
|
479
482
|
this.$refs.progressBar.style.left = MoveX - this.$refs.progressBar.clientWidth / 2 + "px";
|
|
480
483
|
}
|
|
481
484
|
},
|
|
485
|
+
checkAudioEffectNull() {
|
|
486
|
+
return this.audio.duration === 0 || Number.isNaN(this.audio.duration);
|
|
487
|
+
},
|
|
482
488
|
jumpToTime(time) {
|
|
483
489
|
if (!this.disabled) {
|
|
484
490
|
this.pauseAudio();
|
|
485
|
-
if (this.
|
|
491
|
+
if (this.checkAudioEffectNull()) {
|
|
486
492
|
Message.warning(this.unloadTip);
|
|
487
493
|
this.paused = true;
|
|
488
494
|
this.betweenPlaying = false;
|
package/package/nf-audio.vue
CHANGED
|
@@ -193,7 +193,7 @@ export default {
|
|
|
193
193
|
},
|
|
194
194
|
unloadTip: {
|
|
195
195
|
type: String,
|
|
196
|
-
default: '
|
|
196
|
+
default: '音频资源暂无法播放'
|
|
197
197
|
},
|
|
198
198
|
disabled: {
|
|
199
199
|
type: Boolean,
|
|
@@ -537,7 +537,7 @@ export default {
|
|
|
537
537
|
},
|
|
538
538
|
betweenPlay() {
|
|
539
539
|
if (!this.disabled) {
|
|
540
|
-
if (this.
|
|
540
|
+
if (this.checkAudioEffectNull()) {
|
|
541
541
|
Message.warning(this.unloadTip)
|
|
542
542
|
this.paused = true
|
|
543
543
|
this.betweenPlaying = false
|
|
@@ -564,7 +564,7 @@ export default {
|
|
|
564
564
|
//点击进度条更新进度
|
|
565
565
|
clickProgress(e) {
|
|
566
566
|
if (!this.disabled) {
|
|
567
|
-
if (this.
|
|
567
|
+
if (this.checkAudioEffectNull()) {
|
|
568
568
|
if (!this.paused) {
|
|
569
569
|
Message.warning(this.unloadTip)
|
|
570
570
|
}
|
|
@@ -589,7 +589,7 @@ export default {
|
|
|
589
589
|
//鼠标弹起
|
|
590
590
|
handleMouseup() {
|
|
591
591
|
if (!this.disabled) {
|
|
592
|
-
if (this.
|
|
592
|
+
if (this.checkAudioEffectNull()) {
|
|
593
593
|
Message.warning(this.unloadTip)
|
|
594
594
|
this.paused = true
|
|
595
595
|
this.betweenPlaying = false
|
|
@@ -610,6 +610,9 @@ export default {
|
|
|
610
610
|
//调整进度
|
|
611
611
|
handleMousedown() {
|
|
612
612
|
if (!this.disabled) {
|
|
613
|
+
if (this.checkAudioEffectNull()) {
|
|
614
|
+
return
|
|
615
|
+
}
|
|
613
616
|
this.pauseAudio()
|
|
614
617
|
this.paused = true
|
|
615
618
|
this.betweenPlaying = false
|
|
@@ -655,10 +658,13 @@ export default {
|
|
|
655
658
|
this.$refs.progressBar.style.left = MoveX - (this.$refs.progressBar.clientWidth / 2) + 'px'
|
|
656
659
|
}
|
|
657
660
|
},
|
|
661
|
+
checkAudioEffectNull() {
|
|
662
|
+
return this.audio.duration === 0 || Number.isNaN(this.audio.duration)
|
|
663
|
+
},
|
|
658
664
|
jumpToTime(time) {
|
|
659
665
|
if (!this.disabled) {
|
|
660
666
|
this.pauseAudio()
|
|
661
|
-
if (this.
|
|
667
|
+
if (this.checkAudioEffectNull()) {
|
|
662
668
|
Message.warning(this.unloadTip)
|
|
663
669
|
this.paused = true
|
|
664
670
|
this.betweenPlaying = false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-audio",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.69",
|
|
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.69",
|
|
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": "e681a4e9428cd1c1d6ce91e4cf863c4cea49c7d2"
|
|
34
34
|
}
|