Browse Source

1.修改素材选择页布局

wenweiwei 3 years ago
parent
commit
c5dcf20147

+ 3 - 1
BFFramework/Classes/BFModules/BFUtility/PQSingletoVideoPlayer.swift

@@ -272,7 +272,9 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
                 PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: ["pageSource": playVideoData!.pageSource.rawValue, "networkType": networkStatus(), "extra": "0", "hasRetry": false, "url": playVideoData?.videoPath ?? "", "videoId": playVideoData?.uniqueId ?? "0", "what": event], shareId: nil, videoIds: nil, playId: playId)
             }
         case PLAY_ERR_HEVC_DECODE_FAIL.rawValue, PLAY_ERR_HLS_KEY.rawValue, PLAY_ERR_GET_PLAYINFO_FAIL.rawValue, PLAY_WARNING_VIDEO_DECODE_FAIL.rawValue, PLAY_WARNING_AUDIO_DECODE_FAIL.rawValue: // H265解码失败,HLS解码key获取失败,获取点播文件信息失败,当前视频解码失败,当前音频解码失败
-
+            if playStatusBloc != nil {
+                playStatusBloc!(.PQVIDEO_PLAY_STATUS_FAUILE)
+            }
             if !isPlayerError, playVideoData != nil {
                 isPlayerError = true
                 // 播放失败

+ 6 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -242,7 +242,9 @@ class PQStuckPointEditerController: PQBaseViewController {
     override func viewWillAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
         lineView?.isHidden = true
-        UIApplication.shared.isIdleTimerDisabled = true
+        DispatchQueue.main.async {
+            UIApplication.shared.isIdleTimerDisabled = true
+        }
         musicNameLab.move()
 
         PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
@@ -272,7 +274,9 @@ class PQStuckPointEditerController: PQBaseViewController {
 
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
-        UIApplication.shared.isIdleTimerDisabled = false
+        DispatchQueue.main.async {
+            UIApplication.shared.isIdleTimerDisabled = false
+        }
         musicNameLab.stop()
         playerView.pause()
     }

+ 6 - 4
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -565,9 +565,9 @@ class PQStuckPointPublicController: PQBaseViewController {
         super.viewWillAppear(animated)
         PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
         PQNotification.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
-        UIApplication.shared.isIdleTimerDisabled = true
-        
-        
+        DispatchQueue.main.async {
+            UIApplication.shared.isIdleTimerDisabled = true
+        }
         //从相册选择一个照片后回调
         addNotification(self, selector: #selector(imageSelectedImage(notify:)), name: cSelectedImageSuccessKey, object: nil)
 
@@ -592,7 +592,9 @@ class PQStuckPointPublicController: PQBaseViewController {
 
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
-        UIApplication.shared.isIdleTimerDisabled = false
+        DispatchQueue.main.async {
+            UIApplication.shared.isIdleTimerDisabled = false
+        }
     }
 
     deinit {