Commit 34115113 authored by 李帅's avatar 李帅

+1

parent 0a0915ce
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-05-15 18:22:18 * @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-06-10 11:18:04 * @LastEditTime: 2022-06-13 10:23:28
* @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
...@@ -216,8 +216,20 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -216,8 +216,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
this._recording = true; this._recording = true;
let idx = -1; // 获取当前录制下标
for (let index = 0; index < this.content.childrenCount; index++) {
const element = this.content.children[index];
// 正在录制中
if (element.getComponent(Item).getRecording()) {
idx = index;
break;
}
}
if (window['courseware']) { if (window['courseware']) {
window['courseware'].startRecord(0); if (idx !== -1) {
window['courseware'].startTest(this.data.sentences[idx]);
}
} }
}); });
record_stop.on('click', () => { record_stop.on('click', () => {
...@@ -246,7 +258,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -246,7 +258,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
if (window['courseware']) { if (window['courseware']) {
window['courseware'].stopRecord((res) => { window['courseware'].stopTest((res) => {
this.log('--------录音返回结果 stopRecord ------------'); this.log('--------录音返回结果 stopRecord ------------');
this.log(res); this.log(res);
this.log(`录音的音频URL是${JSON.parse(res).audioUrl}`); this.log(`录音的音频URL是${JSON.parse(res).audioUrl}`);
......
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-05-15 18:22:18 * @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-06-10 10:54:08 * @LastEditTime: 2022-06-13 10:24:39
* @LastEditors: ls * @LastEditors: ls
* @Description: * @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\defaultData.ts * @FilePath: \ls_gramophone\assets\ls_gramophone\script\defaultData.ts
*/ */
export const defaultData = { export const defaultData = {
title: '标题标题标题标题', title: '标题标题',
questionText: '题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明', questionText: '题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明',
questionTextAudio: 'http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3', questionTextAudio: 'http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3',
pageImage: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', // 左边的图片 pageImage: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', // 左边的图片
......
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