Skip to content

Commit

Permalink
remove background(.black)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Mar 28, 2022
1 parent 9cc831c commit 18617b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/KSPlayer/MEPlayer/MetalPlayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ final class MetalPlayView: UIView {
#if !canImport(UIKit)
layer = AVSampleBufferDisplayLayer()
#endif
#if os(macOS) || targetEnvironment(macCatalyst)
(view.layer as? CAMetalLayer)?.wantsExtendedDynamicRangeContent = true
#endif
view.framebufferOnly = true
displayLink.add(to: RunLoop.main, forMode: .common)
isPaused = true
Expand Down Expand Up @@ -181,9 +184,6 @@ extension MetalPlayView {
}
view.colorPixelFormat = KSOptions.colorPixelFormat(bitDepth: pixelBuffer.bitDepth)
(view.layer as? CAMetalLayer)?.colorspace = pixelBuffer.colorspace
#if os(macOS) || targetEnvironment(macCatalyst)
(view.layer as? CAMetalLayer)?.wantsExtendedDynamicRangeContent = true
#endif
guard let drawable = view.currentDrawable else {
return
}
Expand Down
1 change: 0 additions & 1 deletion Sources/KSPlayer/SwiftUI/KSVideoPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public struct KSVideoPlayerView: View {
subtitleModel.selectedSubtitle = try? result.get()
}
}
.background(.black)
.edgesIgnoringSafeArea(.all)
.onDisappear {
player.coordinator.playerLayer?.pause()
Expand Down

0 comments on commit 18617b1

Please sign in to comment.