Commit 77775eb5 authored by liujiangnan's avatar liujiangnan

test

parent 1a44ea67
...@@ -3826,8 +3826,8 @@ ...@@ -3826,8 +3826,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
450.324, 445.858,
-195.849, -212.224,
0, 0,
0, 0,
0, 0,
...@@ -3997,8 +3997,8 @@ ...@@ -3997,8 +3997,8 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "加载资源", "_string": "获取设备信息",
"_N$string": "加载资源", "_N$string": "获取设备信息",
"_fontSize": 20, "_fontSize": 20,
"_lineHeight": 40, "_lineHeight": 40,
"_enableWrapText": false, "_enableWrapText": false,
......
const testMockData = {"eof":1,"file":"/storage/emulated/0/Android/data/com.example.oxford/cache/shengtong/gradeVoice.mp3","audioUrl":"https://staging-teach.cdn.ireadabc.com/db48d49e122ba65aa7c5ee56963418a6.mp3","result":{"duration":"2.470","fluency":100,"integrity":100,"kernel_version":"3.6.7","overall":99,"pronunciation":99,"resource_version":"2.3.6","rhythm":0,"speed":78},"tokenId":"621c32543327932cfc000002"}; const testMockData = {"eof":1,"file":"/storage/emulated/0/Android/data/com.example.oxford/cache/shengtong/gradeVoice.mp3","audioUrl":"https://staging-teach.cdn.ireadabc.com/db48d49e122ba65aa7c5ee56963418a6.mp3","result":{"duration":"2.470","fluency":100,"integrity":100,"kernel_version":"3.6.7","overall":99,"pronunciation":99,"resource_version":"2.3.6","rhythm":0,"speed":78},"tokenId":"621c32543327932cfc000002"};
const recordMockData = {"text":"what can i do for you","audioUrl":"https://staging-teach.cdn.ireadabc.com/368ad56174f85e2ff1f39f12bac5c693.mp3"};
export function initAir(_this) { export function initAir(_this) {
const realAir = { const realAir = {
...@@ -230,7 +231,7 @@ export function initAir(_this) { ...@@ -230,7 +231,7 @@ export function initAir(_this) {
} else if (method == 'stopTest') { } else if (method == 'stopTest') {
window.air.testCallBack(testMockData); window.air.testCallBack(testMockData);
} else if (method == 'stopTest') { } else if (method == 'stopTest') {
window.air.testCallBack(testMockData); window.air.testCallBack(recordMockData);
} else{ } else{
console.error(`${method}方法还没有Mock数据,请联系技术支持人员添加`); console.error(`${method}方法还没有Mock数据,请联系技术支持人员添加`);
} }
......
...@@ -360,12 +360,21 @@ cc.Class({ ...@@ -360,12 +360,21 @@ cc.Class({
const BtnLoad = cc.find('middleLayer/ui/BtnLoad'); const BtnLoad = cc.find('middleLayer/ui/BtnLoad');
BtnLoad.on('click', () => { BtnLoad.on('click', () => {
this.preloadCount = 0;
this.loadedCount = 0; // 测试获取设备信息
cc.find("middleLayer/ui/ProgressLabel").active = true; window.courseware.getEngineInfo(res => {
cc.find('middleLayer/ui/loadingProgress').active = true; this.log('--------getEngineInfo返回结果---------');
// this.preloadAll(); this.log(res)
this.preloadSourceImman(); this.log('------------------------------');
});
// 测试预加载资源
// this.preloadCount = 0;
// this.loadedCount = 0;
// cc.find("middleLayer/ui/ProgressLabel").active = true;
// cc.find('middleLayer/ui/loadingProgress').active = true;
// // this.preloadAll();
// this.preloadSourceImman();
}); });
const btnClose = cc.find('middleLayer/ConsoleNode/BtnClose'); const btnClose = cc.find('middleLayer/ConsoleNode/BtnClose');
......
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