Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy17_hds
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
hy17_hds
Commits
1ed99576
Commit
1ed99576
authored
Jul 13, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加log
parent
b88eacad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
hy17_hds.ts
assets/hy17_hds/scene/hy17_hds.ts
+13
-0
No files found.
assets/hy17_hds/scene/hy17_hds.ts
View file @
1ed99576
...
@@ -209,6 +209,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -209,6 +209,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
microphone_area
.
angle
=
0
;
this
.
microphone_area
.
angle
=
0
;
this
.
time_area
.
active
=
false
;
this
.
time_area
.
active
=
false
;
}
}
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
)
{
node
.
getComponent
(
'
middleLayer
'
).
log
(
str
);
}
else
{
console
.
log
(
str
);
}
}
//按钮触发,使用的方法
//按钮触发,使用的方法
async
onTouchRecord
()
{
async
onTouchRecord
()
{
if
(
this
.
recording
)
return
;
if
(
this
.
recording
)
return
;
...
@@ -219,6 +229,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -219,6 +229,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showVoiceFlash
();
this
.
showVoiceFlash
();
this
.
microphoneAreaRecover
();
this
.
microphoneAreaRecover
();
this
.
log
(
"
startTestConvert
"
)
cc
.
audioEngine
.
stopAllEffects
();
cc
.
audioEngine
.
stopAllEffects
();
courseware
&&
courseware
.
startTestConvert
(
this
.
letter
);
//开始录音
courseware
&&
courseware
.
startTestConvert
(
this
.
letter
);
//开始录音
...
@@ -260,9 +271,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -260,9 +271,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
this
.
recrodEnd
(
testData
)
return
this
.
recrodEnd
(
testData
)
}
}
courseware
&&
courseware
.
stopTestConvert
((
res
)
=>
{
courseware
&&
courseware
.
stopTestConvert
((
res
)
=>
{
this
.
log
(
"
stopTestConvert:
"
+
res
)
res
=
JSON
.
parse
(
res
);
res
=
JSON
.
parse
(
res
);
this
.
recrodEnd
(
res
);
this
.
recrodEnd
(
res
);
},
covert
=>
{
},
covert
=>
{
this
.
log
(
"
convertUrl:
"
+
covert
.
convertUrl
)
this
.
recordAudio
=
covert
.
convertUrl
;
this
.
recordAudio
=
covert
.
convertUrl
;
// 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'}
// 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'}
});
//结束录音
});
//结束录音
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment