Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d911f63d
authored
Apr 14, 2026
by
岑成威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:ios
1 parent
08292f4c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
18 deletions
apps/uniappX/uniapp-x-tape/.hbuilderx/launch.json
apps/uniappX/uniapp-x-tape/config/logger.config.uts
apps/uniappX/uniapp-x-tape/services/recorder/strategies/RecordCacheManager.uts
apps/uniappX/uniapp-x-tape/uni_modules/uni-recorder-x/utssdk/app-ios/UniAudioRecorderManager.swift
apps/uniappX/uniapp-x-tape/.hbuilderx/launch.json
View file @
d911f63
...
...
@@ -3,12 +3,15 @@
"configurations"
:
[
{
"customPlaygroundType"
:
"local"
,
"playground"
:
"
custom
"
,
"playground"
:
"
standard
"
,
"type"
:
"uni-app:app-android"
},
{
"customPlaygroundType"
:
"device"
,
"playground"
:
"standard"
,
"bundleId"
:
"uni.app.UNIB602BFA"
,
"certificateFile"
:
"/Users/cenchengwei/Desktop/uniapp-x-tape/证书.p12"
,
"certificateProfileFile"
:
"/Users/cenchengwei/Desktop/uniapp-x-tape/uniappxtapeProfiles.mobileprovision"
,
"playground"
:
"custom"
,
"runSignStatus"
:
1
,
"type"
:
"uni-app:app-ios"
}
]
...
...
apps/uniappX/uniapp-x-tape/config/logger.config.uts
View file @
d911f63
import { UploadConfig } from "@/services/logger/index";
export const LoggerUploadServerUrl: string = "http://192.168.1.237:3000/file/upload";
export const LoggerUploadHeaders: null | UTSJSONObject = null;
export const LoggerUploadDays: number = 7;
type LoggerUploadConfig = {
days?: number
headers?: null | UTSJSONObject
serverUrl: string
}
type LoggerDefaultConfig = {
upload: LoggerUploadConfig
}
/**
* 日志服务默认配置
*/
...
...
@@ -27,5 +35,5 @@ export const LoggerConfig = {
* 默认上传最近几天的日志
*/
days: LoggerUploadDays
} as UploadConfig
};
} as
Logger
UploadConfig
}
as LoggerDefaultConfig
;
apps/uniappX/uniapp-x-tape/services/recorder/strategies/RecordCacheManager.uts
View file @
d911f63
import
services from "@/service
s";
import
{ logger } from "../../logger/index.ut
s";
/**
* 消费缓存:读取缓存 -> 返回数据 -> 删除缓存
*/
...
...
@@ -29,15 +29,15 @@ export async function consumeAll(recordId: string, cacheConfig: string[]): Promi
uni.removeStorage({
key: storageKey,
fail: (res) => {
services.
logger.warn(`RecordCacheManager: Remove ${storageKey} failed: ${res.errMsg}`, "RecordCache");
logger.warn(`RecordCacheManager: Remove ${storageKey} failed: ${res.errMsg}`, "RecordCache");
}
});
}
}).catch((error) => {
services.logger?
.warn(`RecordCacheManager: Consume ${fieldName} failed: ${error}`, "RecordCache");
logger
.warn(`RecordCacheManager: Consume ${fieldName} failed: ${error}`, "RecordCache");
});
} catch (error) {
services.logger?
.warn(`RecordCacheManager: Consume ${fieldName} failed: ${error}`, "RecordCache");
logger
.warn(`RecordCacheManager: Consume ${fieldName} failed: ${error}`, "RecordCache");
}
});
...
...
@@ -96,10 +96,10 @@ export function set(recordId: string, keyPrefix: string, data: any) {
key: keyPrefix + recordId,
data,
fail: (res) => {
services.logger?
.error(`RecordCacheManager: Set ${keyPrefix} failed: ${res.errMsg}`, "RecordCache");
logger
.error(`RecordCacheManager: Set ${keyPrefix} failed: ${res.errMsg}`, "RecordCache");
}
});
} catch (error) {
services.logger?
.error(`RecordCacheManager: Set ${keyPrefix} failed: ${error}`, "RecordCache");
logger
.error(`RecordCacheManager: Set ${keyPrefix} failed: ${error}`, "RecordCache");
}
}
apps/uniappX/uniapp-x-tape/uni_modules/uni-recorder-x/utssdk/app-ios/UniAudioRecorderManager.swift
View file @
d911f63
...
...
@@ -113,15 +113,15 @@ public class UniAudioRecorderManager: NSObject, RecorderManager {
self
.
stop
()
let
durationMs
=
options
.
duration
??
Double
.
greatestFiniteMagnitude
let
durationMs
=
options
.
duration
?
.
doubleValue
??
Double
.
greatestFiniteMagnitude
let
duration
=
durationMs
==
Double
.
greatestFiniteMagnitude
?
durationMs
:
durationMs
/
1000.0
let
sampleRate
=
options
.
sampleRate
??
44100
let
sampleRate
=
options
.
sampleRate
??
NSNumber
(
value
:
44100
)
guard
sampleRates
.
contains
(
sampleRate
.
int32Value
)
else
{
failedAction
(
1107602
)
return
}
let
channels
=
options
.
numberOfChannels
??
1
let
bitRate
=
options
.
encodeBitRate
??
128000
let
channels
=
options
.
numberOfChannels
??
NSNumber
(
value
:
1
)
let
bitRate
=
options
.
encodeBitRate
??
NSNumber
(
value
:
128000
)
let
(
valid
,
error
)
=
isValidEncodeBitRate
(
bitRate
.
int32Value
,
compare
:
sampleRate
.
int32Value
)
guard
valid
else
{
...
...
@@ -490,4 +490,3 @@ extension UniAudioRecorderManager {
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment