소스 검색

延迟0.1播放 规避首帧花屏问题

jsonwang 3 년 전
부모
커밋
10e189ba04
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Introduce/Record/INVideoExportController.swift

+ 1 - 0
Introduce/Record/INVideoExportController.swift

@@ -225,6 +225,7 @@ class INVideoExportController: BFBaseViewController {
                 if let fileUrl = url {
                     let item = AVPlayerItem(url: fileUrl)
                     sself.avplayer.replaceCurrentItem(with: item)
+                    usleep(1000)
                     sself.avplayer.play()
                     sself.playerLayer.borderColor = ThemeStyleColor.cgColor