From 1522976376fb220ae052e3b99eef6cd2ca818223 Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Tue, 30 Apr 2024 18:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91tipsbutton=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CCSpatialVideoDisplayController.swift | 3 +++ .../ZZHCustomPlayer.swift | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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) }