Commit eeba68a5 authored by 李帅's avatar 李帅

+1

parent 0fcd8350
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-05-15 18:22:18 * @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-06-14 17:51:57 * @LastEditTime: 2022-06-14 18:47:33
* @LastEditors: ls * @LastEditors: ls
* @Description: * @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts * @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts
...@@ -308,6 +308,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -308,6 +308,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (idx !== -1) { if (idx !== -1) {
this._records[idx] = res.audioUrl; this._records[idx] = res.audioUrl;
this.log(`${idx} ===> ${res.audioUrl}`); this.log(`${idx} ===> ${res.audioUrl}`);
this.scheduleOnce(() => {
this.resetRecord();
}, 0.1);
} }
} }
...@@ -327,10 +331,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -327,10 +331,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 模拟测试 // 模拟测试
// this._records[idx] = 'http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3'; // this._records[idx] = 'http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3';
} }
this.scheduleOnce(() => {
this.resetRecord();
}, 0.1);
}); });
} }
...@@ -353,6 +353,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -353,6 +353,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (this._records[index] === null) { if (this._records[index] === null) {
element.getComponent(Item).hideRecord(); element.getComponent(Item).hideRecord();
} else { } else {
console.log(`===> ${index}`);
element.getComponent(Item).stopRecord(); element.getComponent(Item).stopRecord();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment