@94ai/nf-audio 3.3.74 → 3.4.0

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.
@@ -43,7 +43,7 @@ const _sfc_main = {
43
43
  },
44
44
  crossTimeTip: {
45
45
  type: String,
46
- default: "开始时间不能大于总时长"
46
+ default: "定位播放时间点不能大于音频总时长"
47
47
  },
48
48
  unloadTip: {
49
49
  type: String,
@@ -528,12 +528,15 @@ const _sfc_main = {
528
528
  return false;
529
529
  }
530
530
  if (time >= this.audio.duration) {
531
- this.audio.currentTime = this.audio.duration;
532
- this.currentTime = timeFormat(this.audio.currentTime);
533
- this.calcMoveX();
534
- this.playAudio();
535
531
  if (time > this.audio.duration) {
536
- console.error(this.crossTimeTip);
532
+ NfMessage.Message.warning(this.crossTimeTip);
533
+ this.paused = true;
534
+ this.betweenPlaying = false;
535
+ } else {
536
+ this.audio.currentTime = this.audio.duration;
537
+ this.currentTime = timeFormat(this.audio.currentTime);
538
+ this.calcMoveX();
539
+ this.playAudio();
537
540
  }
538
541
  return false;
539
542
  } else if (time >= 0 && time < this.audio.duration) {
@@ -41,7 +41,7 @@ const _sfc_main = {
41
41
  },
42
42
  crossTimeTip: {
43
43
  type: String,
44
- default: "开始时间不能大于总时长"
44
+ default: "定位播放时间点不能大于音频总时长"
45
45
  },
46
46
  unloadTip: {
47
47
  type: String,
@@ -526,12 +526,15 @@ const _sfc_main = {
526
526
  return false;
527
527
  }
528
528
  if (time >= this.audio.duration) {
529
- this.audio.currentTime = this.audio.duration;
530
- this.currentTime = timeFormat(this.audio.currentTime);
531
- this.calcMoveX();
532
- this.playAudio();
533
529
  if (time > this.audio.duration) {
534
- console.error(this.crossTimeTip);
530
+ Message.warning(this.crossTimeTip);
531
+ this.paused = true;
532
+ this.betweenPlaying = false;
533
+ } else {
534
+ this.audio.currentTime = this.audio.duration;
535
+ this.currentTime = timeFormat(this.audio.currentTime);
536
+ this.calcMoveX();
537
+ this.playAudio();
535
538
  }
536
539
  return false;
537
540
  } else if (time >= 0 && time < this.audio.duration) {
@@ -203,7 +203,7 @@ export default {
203
203
  },
204
204
  crossTimeTip: {
205
205
  type: String,
206
- default: '开始时间不能大于总时长'
206
+ default: '定位播放时间点不能大于音频总时长'
207
207
  },
208
208
  unloadTip: {
209
209
  type: String,
@@ -704,12 +704,15 @@ export default {
704
704
  return false
705
705
  }
706
706
  if (time >= this.audio.duration) {
707
- this.audio.currentTime = this.audio.duration
708
- this.currentTime = timeFormat(this.audio.currentTime)
709
- this.calcMoveX()
710
- this.playAudio()
711
707
  if (time > this.audio.duration) {
712
- console.error(this.crossTimeTip)
708
+ Message.warning(this.crossTimeTip)
709
+ this.paused = true
710
+ this.betweenPlaying = false
711
+ } else {
712
+ this.audio.currentTime = this.audio.duration
713
+ this.currentTime = timeFormat(this.audio.currentTime)
714
+ this.calcMoveX()
715
+ this.playAudio()
713
716
  }
714
717
  return false
715
718
  } else if (time >= 0 && time < this.audio.duration) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-audio",
3
- "version": "3.3.74",
3
+ "version": "3.4.0",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "liuxiangxiang <liuxiangxiang@94ai.com>",
@@ -14,8 +14,8 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-message": "^3.3.74",
18
- "@94ai/nf-theme-chalk": "^3.3.74",
17
+ "@94ai/nf-message": "^3.4.0",
18
+ "@94ai/nf-theme-chalk": "^3.4.0",
19
19
  "vue-demi": "^0.14.5"
20
20
  },
21
21
  "peerDependenciesMeta": {
@@ -31,5 +31,5 @@
31
31
  "types": "lib/index.d.ts",
32
32
  "main": "lib/nf-audio.cjs.js",
33
33
  "module": "lib/nf-audio.esm-bundler.js",
34
- "gitHead": "ded149b3495dc315b06db8f2d5cc471512043074"
34
+ "gitHead": "08e918fa49ed52ea117a59b3d5b760bbcd42560d"
35
35
  }