diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift index c68f397..891b2bb 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift @@ -280,6 +280,9 @@ class CCSpatialVideoDisplayController: BaseController { self.customPlayer.snp.updateConstraints { make in make.height.equalTo(460) } + self.customPlayer.boardViewDismissCallback = {[weak self] value in + self?.tipsButton.isHidden = !value + } navtionBar?.snp.updateConstraints { make in make.top.equalToSuperview().offset(0) } diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift index c6b10d9..0e6a41a 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift @@ -8,11 +8,13 @@ import Foundation import UIKit import AVKit - +typealias ZZHCustomPlayerBoardViewDismissCallback = (_ value:Bool)->Void typealias CustomMaskViewTapCallback = ()->Void let userdefaultValueKey_scale = "userdefaultValueKey_scale" let userdefaultValueKey_ed = "userdefaultValueKey_ed" class ZZHCustomPlayer: UIView { + //用于隐藏那个操作说明回调 + var boardViewDismissCallback:ZZHCustomPlayerBoardViewDismissCallback? //点击maskview 的回调,主要用于方向旋转 var maskViewTapCallback:CustomMaskViewTapCallback? @@ -115,6 +117,8 @@ class ZZHCustomPlayer: UIView { UserDefaults.standard.setValue(currentScale, forKey: userdefaultValueKey_scale ) UserDefaults.standard.setValue(currentED, forKey: userdefaultValueKey_ed) UserDefaults.standard.synchronize() + + } func releaseVideoComposition() { @@ -246,6 +250,9 @@ class ZZHCustomPlayer: UIView { //显示调节瞳距、缩放的界面 @objc func showEDView(sender:UIButton){ + if let bvcallback = self.boardViewDismissCallback { + bvcallback(false) + } CustomParamBoardView.showBoard(scaleCallback: {[weak self] scale in self?.currentScale = scale }, edCallback: {[weak self] ed in @@ -253,8 +260,12 @@ class ZZHCustomPlayer: UIView { },resetCallback:{[weak self] in self?.currentScale = 1.0 self?.currentED = 0 + }, dismissCallback:{[weak self] in self?.saveParams() + if let bvcallback = self?.boardViewDismissCallback { + bvcallback(true) + } },scale: currentScale, ed: currentED,canChangeED: isPlayingOnExternalScreen) }