|
@@ -104,9 +104,20 @@ export default {
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
this.i_audio = $("#audioTag")[0];
|
|
|
- $("#audioTag").on("loadedmetadata", (e) => {
|
|
|
- this.time = this.transTime(e.currentTarget.duration);
|
|
|
- this.allTime = this.transTime(e.currentTarget.duration);
|
|
|
+ // $("#audioTag").on("loadedmetadata", (e) => {
|
|
|
+ // window.alert('音频-loadedmetadata');
|
|
|
+ // console.log('e',e);
|
|
|
+ // console.log('e1',e.deletateTarget);
|
|
|
+ // console.log('duration',e.currentTarget.duration);
|
|
|
+ // this.time = this.transTime(e.currentTarget.duration);
|
|
|
+ // this.allTime = this.transTime(e.currentTarget.duration);
|
|
|
+ // this.i_audio.play();
|
|
|
+ // this.isPlay = true;
|
|
|
+ // });
|
|
|
+ $("#audioTag").on("durationchange ", (e) => {
|
|
|
+ console.log('duration',e.target.duration);
|
|
|
+ this.time = this.transTime(e.target.duration);
|
|
|
+ this.allTime = this.transTime(e.target.duration);
|
|
|
this.i_audio.play();
|
|
|
this.isPlay = true;
|
|
|
});
|