Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ
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
middleLayer_for_NJ
Commits
96424550
Commit
96424550
authored
Dec 07, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 实时翻译
parent
e5dbda1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
air.js
assets/middleLayer_for_NJ/script/air.js
+19
-1
No files found.
assets/middleLayer_for_NJ/script/air.js
View file @
96424550
...
@@ -13,6 +13,9 @@ export function initAir(_this) {
...
@@ -13,6 +13,9 @@ export function initAir(_this) {
_this
.
log
(
"
***成功调用onCourseInScreen***
"
);
_this
.
log
(
"
***成功调用onCourseInScreen***
"
);
});
});
},
},
recordRealtimeCallBack
:
function
(
res
)
{
_this
.
log
(
`***成功调用recordRealtimeCallBack***参数==
${
res
}
`
);
},
osmoCallback
:
function
(
res
)
{
osmoCallback
:
function
(
res
)
{
_this
.
log
(
`***成功调用osmoCallback***参数==
${
res
}
`
);
_this
.
log
(
`***成功调用osmoCallback***参数==
${
res
}
`
);
},
},
...
@@ -43,7 +46,7 @@ export function initAir(_this) {
...
@@ -43,7 +46,7 @@ export function initAir(_this) {
window
.
air
=
new
Proxy
(
realAir
,
{
window
.
air
=
new
Proxy
(
realAir
,
{
set
:
function
(
target
,
key
,
value
,
receiver
)
{
set
:
function
(
target
,
key
,
value
,
receiver
)
{
let
newValue
=
value
;
let
newValue
=
value
;
if
(
key
==
"
osmoCallback
"
||
key
==
"
osmoHandwritingCallback
"
||
key
==
"
osmoHandwritingMlkitCallback
"
||
key
==
"
osmoFingerReadCallback
"
)
{
if
(
key
==
"
recordRealtimeCallBack
"
||
key
==
"
osmoCallback
"
||
key
==
"
osmoHandwritingCallback
"
||
key
==
"
osmoHandwritingMlkitCallback
"
||
key
==
"
osmoFingerReadCallback
"
)
{
newValue
=
function
(
res
)
{
newValue
=
function
(
res
)
{
_this
.
log
(
`||==成功调用
${
key
}
==||参数==
${
JSON
.
stringify
(
res
)}
`
);
_this
.
log
(
`||==成功调用
${
key
}
==||参数==
${
JSON
.
stringify
(
res
)}
`
);
if
(
typeof
(
res
)
==
'
string
'
)
{
if
(
typeof
(
res
)
==
'
string
'
)
{
...
@@ -165,6 +168,18 @@ export function initAir(_this) {
...
@@ -165,6 +168,18 @@ export function initAir(_this) {
};
};
window
.
courseware
.
callOcMethod
(
"
stopTest
"
,
{});
window
.
courseware
.
callOcMethod
(
"
stopTest
"
,
{});
},
},
startRealtimeRecord
(
params
=
{})
{
window
.
courseware
.
hasCalledRealtimeRecord
=
true
;
_this
.
log
(
`===成功调用startRealtimeRecord===
${
JSON
.
stringify
(
params
)}
`
);
window
.
courseware
.
callOcMethod
(
"
startRealtimeRecord
"
,
params
);
},
stopRealtimeRecord
(
params
=
{})
{
window
.
courseware
.
hasCalledRealtimeRecord
=
false
;
_this
.
log
(
`===成功调用stopRealtimeRecord===`
);
window
.
courseware
.
callOcMethod
(
"
stopRealtimeRecord
"
,
params
);
},
// 拍照
// 拍照
takePicture
(
callback
)
{
takePicture
(
callback
)
{
_this
.
log
(
`===成功调用takePicture===`
);
_this
.
log
(
`===成功调用takePicture===`
);
...
@@ -321,6 +336,9 @@ export function initAir(_this) {
...
@@ -321,6 +336,9 @@ export function initAir(_this) {
if
(
window
.
courseware
.
hasCalledStartTest
)
{
if
(
window
.
courseware
.
hasCalledStartTest
)
{
window
.
courseware
.
stopTest
();
window
.
courseware
.
stopTest
();
}
}
if
(
window
.
courseware
.
hasCalledRealtimeRecord
)
{
window
.
courseware
.
stopRealtimeRecord
();
}
if
(
window
.
courseware
.
hasCalledOpenRecognitionCamera
)
{
if
(
window
.
courseware
.
hasCalledOpenRecognitionCamera
)
{
window
.
courseware
.
closeRecognitionCamera
();
window
.
courseware
.
closeRecognitionCamera
();
}
}
...
...
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