开发完错题本
This commit is contained in:
@@ -68,7 +68,7 @@ export const useAudioStore = defineStore('audioStore', {
|
||||
// 音频可以播放时触发(此时通常能获取到时长)
|
||||
this.audioInstance.onCanplay(() => {
|
||||
// 尝试获取时长(部分环境需要延迟一点)
|
||||
console.log('尝试获取时长(部分环境需要延迟一点)');
|
||||
// console.log('尝试获取时长(部分环境需要延迟一点)');
|
||||
setTimeout(() => {
|
||||
const duration = this.audioInstance.duration || 0;
|
||||
console.log('尝试获duration', duration);
|
||||
@@ -208,7 +208,6 @@ export const useAudioStore = defineStore('audioStore', {
|
||||
},
|
||||
// 注册播放完成回调
|
||||
onAudioEnded(callback) {
|
||||
console.log('onAudioEnded');
|
||||
if (typeof callback === 'function') {
|
||||
this.callbacks.onEnded = callback;
|
||||
}
|
||||
@@ -216,7 +215,6 @@ export const useAudioStore = defineStore('audioStore', {
|
||||
|
||||
// 注册播放错误回调
|
||||
onAudioError(callback) {
|
||||
console.log('注册播放错误回调');
|
||||
if (typeof callback === 'function') {
|
||||
this.callbacks.onError = callback;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user