Browse Source

rename class;
phasset转avurlasset 使用option,解决iOS12 上获取失败的bug

harry 3 năm trước cách đây
mục cha
commit
5326aaae3b

+ 21 - 0
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/changeVoice_h.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "changeVoice_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/changeVoice_h.imageset/changeVoice_h@3x.png


+ 21 - 0
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/withdraw_h.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "withdraw_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/withdraw_h.imageset/withdraw_h@3x.png


+ 21 - 0
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/withdraw_n.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "withdraw_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFRecordScreenKit/Assets/BFRecordScreenKit.xcassets/withdraw_n.imageset/withdraw_n@3x.png


+ 3 - 3
BFRecordScreenKit/Classes/BFRecordScreenController.swift

@@ -50,9 +50,9 @@ public class BFRecordScreenController: BFBaseViewController {
 
     
     // 录音相关
-    lazy var recorderManager : BFRecordManager = {
+    lazy var recorderManager : BFVoiceRecordManager = {
         
-        let manager = BFRecordManager()
+        let manager = BFVoiceRecordManager()
         manager.cancelRecordHandle = { error in
             
         }
@@ -573,7 +573,7 @@ public class BFRecordScreenController: BFBaseViewController {
 //            }else{
 //
 //            }
-            PHCachingImageManager().requestAVAsset(forVideo: asset, options: nil, resultHandler: {[weak self] (asset: AVAsset?, audioMix: AVAudioMix?, info) in
+            PHCachingImageManager().requestAVAsset(forVideo: asset, options: options, resultHandler: {[weak self] (asset: AVAsset?, audioMix: AVAudioMix?, info) in
                 if let urlass = asset as? AVURLAsset {
                     self?.avasset = urlass
                 }

+ 3 - 3
BFRecordScreenKit/Classes/BFRecordManager.swift → BFRecordScreenKit/Classes/BFVoiceRecordManager.swift

@@ -1,5 +1,5 @@
 //
-//  BFRecordManager.swift
+//  BFVoiceRecordManager.swift
 //  BFRecordScreenKit
 //
 //  Created by 胡志强 on 2021/11/24.
@@ -7,10 +7,10 @@
 
 import Foundation
 import BFCommonKit
-import BFFramework 
+import BFFramework
 import BFVideoEditKit
 
-class BFRecordManager {
+class BFVoiceRecordManager {
     
     // 录音相关
     var audioRecorder: NXAudioRecorder?