crabatool 1.0.847 → 1.0.849

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.847",
3
+ "version": "1.0.849",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -295,8 +295,14 @@ function processEvFile(conn, filePath) {
295
295
  // 模拟上传成功
296
296
  log('模拟上传文件到七牛服务器:', filePath, '->', audioUrl);
297
297
 
298
- // 发送音频URL给前端
299
- sendEvMessage(conn, 'completed', '录制完成', { audioUrl: audioUrl });
298
+ // 确定文件类型
299
+ var fileType = fileExt.toLowerCase() === '.mp4' ? 'video' : 'audio';
300
+
301
+ // 发送文件URL给前端,包含文件类型
302
+ sendEvMessage(conn, 'completed', '录制完成', {
303
+ audioUrl: audioUrl,
304
+ fileType: fileType
305
+ });
300
306
 
301
307
  // 保持监控状态,等待下一次录制
302
308
  }