harry před 3 roky
rodič
revize
3eb4bc46e2

+ 0 - 6
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -793,12 +793,6 @@ public class BFRecordScreenController: BFBaseViewController {
     override public func viewDidLoad() {
         super.viewDidLoad()
         _ = disablePopGesture()
- 
-   
-//        let doubleTapGes = UITapGestureRecognizer(target: self, action: #selector(doubleTapAction(tap:)))
-//        doubleTapGes.numberOfTapsRequired = 2
-//        doubleTapGes.numberOfTouchesRequired = 1
-//        view.addGestureRecognizer(doubleTapGes)
         
         // 进入活跃状态
         PQNotification.addObserver(self, selector: #selector(didBecomeActive), name: UIApplication.didBecomeActiveNotification, object: nil)

+ 9 - 1
BFRecordScreenKit/Classes/RecordScreen/View/BFChooseMusicView.swift

@@ -32,6 +32,8 @@ class BFChooseMusicView: UIView {
     // 音乐类别
     var categories = [PQStuckPointMusicTagsModel]()
     
+    var musicVolume = 0.2
+    
     // 选中的音乐
     var chosedMusic : PQVoiceModel?
     
@@ -162,10 +164,13 @@ class BFChooseMusicView: UIView {
         
         slidV.frame = CGRect(x: soundIV.rightX + 20, y: soundIV.y+5, width: cScreenWidth - soundIV.rightX - 20 - 18, height: 18)
         addSubview(slidV)
-        
+        slidV.value = 0.2
+
         progressL.frame = CGRect(x: slidV.x - 7, y: slidV.y - 24, width: 36, height: 16)
         addSubview(progressL)
         
+        valuChange(slid: slidV)
+
         loadedTimeRangesObserver = player.observe(\AVPlayer.currentItem?.loadedTimeRanges, options: [.new, .initial]) { [weak self] (player, change) in
             
             DispatchQueue.main.async {[weak self] in
@@ -273,6 +278,8 @@ class BFChooseMusicView: UIView {
         var frame = progressL.frame
         frame.origin.x = slidV.x - 7 + ((slidV.width - 28) / 100.0) * CGFloat(num)
         progressL.frame = frame
+        musicVolume = Double(num) / 100.0
+        player.volume = Float(musicVolume)
     }
     
     func configCategoriesView(){
@@ -318,6 +325,7 @@ extension BFChooseMusicView:UITableViewDelegate, UITableViewDataSource {
         cell.selectionStyle = .none
         cell.cutCallBack = {[weak self, weak cell] in
             guard let wself = self else { return }
+            wself.player.pause()
             if let data = cell?.data {
                 wself.cutActionCallback?(data)
             }