diff --git a/star_lock/ios/Runner/Info.plist b/star_lock/ios/Runner/Info.plist
index 0720c34d..2014a808 100644
--- a/star_lock/ios/Runner/Info.plist
+++ b/star_lock/ios/Runner/Info.plist
@@ -46,7 +46,7 @@
NSLocationWhenInUseUsageDescription
应用在前台的时候可以搜到更新的位置信息
NSMicrophoneUsageDescription
- 用于音频插件
+ 应用请求麦克风用来通话
NSPhotoLibraryUsageDescription
用于相册
UIApplicationSceneManifest
diff --git a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart
index 303323ad..8bed2ce1 100644
--- a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart
+++ b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart
@@ -196,12 +196,12 @@ class _LockMonitoringPageState extends State {
longPressUp: () async {
// 长按结束
print("onLongPressUp");
+ // _playRecording();
+
if (state.udpStatus.value == 9) {
state.udpStatus.value = 8;
}
_stopRecording();
-
- _playRecording();
}
)
),
@@ -223,7 +223,7 @@ class _LockMonitoringPageState extends State {
}),
bottomBtnItemWidget("images/main/icon_lockDetail_monitoringUnlock.png",
"开锁", AppColors.mainColor, () {
- showDeletPasswordAlertDialog(context);
+ showDeletPasswordAlertDialog(context);
})
]);
}
@@ -353,6 +353,7 @@ class _LockMonitoringPageState extends State {
getFilePath().then((value) {
filePath = value;
});
+ await recorder.openRecorder();
await recorder.startRecorder(
toFile: filePath,
codec: Codec.pcm16WAV,
@@ -390,7 +391,7 @@ class _LockMonitoringPageState extends State {
Future getFilePath() async {
final directory = await getApplicationDocumentsDirectory();
- final filePath = '${directory.path}/recording.wav';
+ final filePath = '${directory.path}/recording.mp3';
// 创建文件
File file = File(filePath);
@@ -411,11 +412,13 @@ class _LockMonitoringPageState extends State {
//播放录音
_playRecording() async {
player = FlutterSoundPlayer();
+ player.openPlayer();
+
await player.startPlayer(
fromURI: filePath,
codec: Codec.pcm16WAV,
);
- Toast.show(msg: "储存录音播放了");
+ // Toast.show(msg: "储存录音播放了");
print('_playRecording() 储存录音播放了');
}