huzhiqiang пре 3 година
родитељ
комит
3b33126f87
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      BFFramework/Classes/BFModules/BFUtility/PQSingletoVideoPlayer.swift

+ 5 - 0
BFFramework/Classes/BFModules/BFUtility/PQSingletoVideoPlayer.swift

@@ -82,6 +82,11 @@ public class PQSingletoVideoPlayer: NSObject {
             PQSingletoMemoryUtil.shared.playCount = PQSingletoMemoryUtil.shared.playCount + 1
         }
     }
+    
+    public func reRenderView(newView: UIView) {
+        player.removeVideoWidget()
+        player.setupVideoWidget(newView, insert: 0)
+    }
 
     /// 重制播放
     public func resetPlayer() {