Disable scrolling the player on macOS
kuglee opened this issue · 5 comments
kuglee commented
What happened?
Hi,
Thanks for the package, it's working great on iOS. However on macOS the player view can be scrolled and a scroll bar is also visible. Is there a way to disable it?
What are the steps to reproduce?
Here is a test view:
public var youtubePlayerView: some View {
YouTubePlayerView(YouTubePlayer("https://youtube.com/watch?v=psL_5RIBqnY"))
.aspectRatio(16 / 9, contentMode: .fit)
}
``
### What is the expected behavior?
I would expect the scroll gesture to be disabled on the player view .
SvenTiigi commented
kuglee commented
Thank, it's working.
The only issue I have now is that aspectRatio(16 / 9, contentMode: .fit)
is not always perfect, so sometimes when the window is resized the scrollbars still appear. I don't know if it's possible to hide them or to size the view some other way to keep aspect ratio.
kuglee commented
I've experimented with WKWebView. This css should hide the scrollbars:
<style>
::-webkit-scrollbar {
display: none !important;
}
</style>
SvenTiigi commented
CSS style has been added with 3370aac and will be available with the next release ✌️
kuglee commented
Awesome. Thanks.