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
ff80c5f9
Commit
ff80c5f9
authored
Aug 05, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加对录音模式的兼容读取
parent
0cf71b5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
jensen.d.ts
jensen.d.ts
+1
-0
index.tsx
src/index.tsx
+1
-0
jensen.js
src/utils/jensen.js
+25
-1
No files found.
jensen.d.ts
View file @
ff80c5f9
...
...
@@ -36,6 +36,7 @@ export type FileInfo = {
time
:
Date
;
// 录音时间
duration
:
number
;
// 持续时长,单位为毫秒
length
:
number
;
// 文件长度,单位为字节
mode
:
'room'
|
'whisper'
|
'call'
;
// 录音模式,room:现场录音,whisper:小笔记,call:通话
signature
:
string
;
// 文件签名,0长度的文件或是录音中的文件的值为000000000000000000000000000000000
};
...
...
src/index.tsx
View file @
ff80c5f9
...
...
@@ -88,6 +88,7 @@ export function Home() {
let
fc
=
await
jensen
.
getFileCount
();
// alert(fc?.count);
let
files
=
await
jensen
.
listFiles
();
console
.
log
(
files
);
setFiles
(
files
)
}
...
...
src/utils/jensen.js
View file @
ff80c5f9
...
...
@@ -780,14 +780,38 @@ Jensen.prototype.listFiles = async function () {
createDate
=
ftime
.
getFullYear
()
+
'/'
+
fnpad
(
ftime
.
getMonth
()
+
1
)
+
'/'
+
fnpad
(
ftime
.
getDate
());
createTime
=
fnpad
(
ftime
.
getHours
())
+
':'
+
fnpad
(
ftime
.
getMinutes
())
+
':'
+
fnpad
(
ftime
.
getSeconds
());
}
let
mode
=
'room'
;
// 如果是旧的whisper mode
fname
=
fname
.
join
(
''
);
if
(
fname
.
match
(
/^.*REC
\d
+
\.(
hda|wav
)
$/gi
))
{
mode
=
'room'
;
}
else
if
(
fname
.
match
(
/^.*WIP
\d
+
\.(
hda|wav
)
$/gi
))
{
mode
=
'whisper'
;
}
else
if
(
fname
.
match
(
/^.*CALL
\d
+
\.(
hda|wav
)
$/gi
))
{
mode
=
'call'
;
}
else
if
(
fname
.
match
(
/^.*ROOM
\d
+
\.(
hda|wav
)
$/gi
))
{
mode
=
'room'
;
}
else
if
(
fname
.
match
(
/^.*WHSP
\d
+
\.(
hda|wav
)
$/gi
))
{
mode
=
'whisper'
;
}
files
.
push
({
name
:
fname
.
join
(
''
)
,
name
:
fname
,
createDate
:
createDate
,
createTime
:
createTime
,
time
:
ftime
,
duration
:
duration
,
version
:
ver
,
length
:
flen
,
mode
:
mode
,
signature
:
sign
.
join
(
''
)
});
// console.log(`Sign1: ${sign.join('')}, Sign2: ${sign2}`);
...
...
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