Commit f8680631 authored by Alex朱枝文's avatar Alex朱枝文

优化代码

parent 47c4c5b6
...@@ -581,13 +581,16 @@ class YHPlayerManager: NSObject { ...@@ -581,13 +581,16 @@ class YHPlayerManager: NSObject {
} }
func exitFloating() { func exitFloating() {
guard let floatingWindow = floatingWindow else {
return
}
// 直播退出channel // 直播退出channel
if floatingWindow?.playbackInfo?.isLive == true, let player = floatingWindow?.player { if floatingWindow.playbackInfo?.isLive == true, let player = floatingWindow.player {
leaveChannel(for: player) leaveChannel(for: player)
} else { } else {
floatingWindow?.player?.stop() floatingWindow.player?.stop()
} }
floatingWindow?.dismiss() floatingWindow.dismiss()
clearFloatingWindow() clearFloatingWindow()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment