Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Skye Yu
jensen
Commits
7ac5c603
Commit
7ac5c603
authored
Apr 24, 2026
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: adding recording switch when vibe mode
parent
0093aef1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
jensen.d.ts
jensen.d.ts
+5
-2
jensen.js
src/utils/jensen.js
+12
-0
No files found.
jensen.d.ts
View file @
7ac5c603
...
@@ -225,7 +225,7 @@ declare class Jensen {
...
@@ -225,7 +225,7 @@ declare class Jensen {
getTime
:
(
time
?:
number
)
=>
Promise
<
{
time
:
string
}
>
;
getTime
:
(
time
?:
number
)
=>
Promise
<
{
time
:
string
}
>
;
// 获取设备设置项,注意:不同型号的设备有不同的设置项
// 获取设备设置项,注意:不同型号的设备有不同的设置项
getSettings
:
(
time
?:
number
)
=>
Promise
<
{
autoRecord
:
boolean
;
autoPlay
:
boolean
;
notification
?:
boolean
}
|
null
>
;
getSettings
:
(
time
?:
number
)
=>
Promise
<
{
autoRecord
:
boolean
;
autoPlay
:
boolean
;
notification
?:
boolean
,
recordOnVibe
?:
boolean
}
|
null
>
;
// 设备Auto Record开关
// 设备Auto Record开关
setAutoRecord
:
(
enable
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
setAutoRecord
:
(
enable
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
...
@@ -233,6 +233,9 @@ declare class Jensen {
...
@@ -233,6 +233,9 @@ declare class Jensen {
// 设置Recording Notification提示音开关,录音开始时是否播放Start Recording
// 设置Recording Notification提示音开关,录音开始时是否播放Start Recording
setAutoPlay
:
(
enable
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
setAutoPlay
:
(
enable
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
// 设置Vibe模式下的Whisper录音开关
setRecordOnVibe
:
(
enable
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
// 设置WebUSB设备接入提示(Windows电脑右下角的弹窗)
// 设置WebUSB设备接入提示(Windows电脑右下角的弹窗)
setNotification
:
(
state
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
setNotification
:
(
state
:
boolean
,
time
?:
number
)
=>
Promise
<
ReturnStruct
[
'common'
]
>
;
...
...
src/utils/jensen.js
View file @
7ac5c603
...
@@ -1366,6 +1366,14 @@ Jensen.prototype.setAutoRecord = function (enable, seconds) {
...
@@ -1366,6 +1366,14 @@ Jensen.prototype.setAutoRecord = function (enable, seconds) {
return
this
.
send
(
new
Command
(
SET_SETTINGS
).
body
([
0
,
0
,
0
,
enable
?
1
:
2
]),
seconds
);
return
this
.
send
(
new
Command
(
SET_SETTINGS
).
body
([
0
,
0
,
0
,
enable
?
1
:
2
]),
seconds
);
};
};
Jensen
.
prototype
.
setRecordOnVibe
=
function
(
enable
,
seconds
)
{
if
(
this
.
model
==
'hidock-p1'
&&
this
.
versionNumber
>=
0x010404
)
{
return
this
.
send
(
new
Command
(
SET_SETTINGS
).
body
([
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
enable
?
1
:
2
]),
seconds
);
}
else
return
{
result
:
false
};
}
Jensen
.
prototype
.
setAutoPlay
=
function
(
enable
,
seconds
)
{
Jensen
.
prototype
.
setAutoPlay
=
function
(
enable
,
seconds
)
{
if
((
this
.
model
==
'hidock-h1'
||
this
.
model
==
'hidock-h1e'
)
&&
this
.
versionNumber
<
327714
)
return
{
result
:
false
};
if
((
this
.
model
==
'hidock-h1'
||
this
.
model
==
'hidock-h1e'
)
&&
this
.
versionNumber
<
327714
)
return
{
result
:
false
};
return
this
.
send
(
new
Command
(
SET_SETTINGS
).
body
([
0
,
0
,
0
,
0
,
0
,
0
,
0
,
enable
?
1
:
2
]),
seconds
);
return
this
.
send
(
new
Command
(
SET_SETTINGS
).
body
([
0
,
0
,
0
,
0
,
0
,
0
,
0
,
enable
?
1
:
2
]),
seconds
);
...
@@ -1638,6 +1646,10 @@ Jensen.registerHandler(GET_SETTINGS, (msg) => {
...
@@ -1638,6 +1646,10 @@ Jensen.registerHandler(GET_SETTINGS, (msg) => {
let
r3
=
msg
.
body
[
11
]
===
1
;
let
r3
=
msg
.
body
[
11
]
===
1
;
rst
[
'notification'
]
=
r3
;
rst
[
'notification'
]
=
r3
;
}
}
if
(
msg
.
body
.
length
>=
19
)
{
let
r5
=
msg
.
body
[
19
];
rst
[
'recordOnVibe'
]
=
r5
===
1
;
}
return
rst
;
return
rst
;
});
});
Jensen
.
registerHandler
(
SET_SETTINGS
,
commonMessageParser
);
Jensen
.
registerHandler
(
SET_SETTINGS
,
commonMessageParser
);
...
...
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