Open SoloUnity opened 1 year ago
@SoloUnity Can you explain what's not working in iOS 16? I just tested and the only difference seems to be that the AZVideoPlayer
view takes up the full safe area by default. It should work the same as iOS 15 if you add .aspectRatio(16/9, contentMode: .fit)
:
Hi, it does not work for me except I use AZVideoPlayer with a couple of additional modifiers. Attached is a video and the relevant code, which worked fine in iOS 15.
@SoloUnity Now that I try it in the context of my project I'm also seeing issues. For me the overlay buttons just don't appear at all. I'll have to look into this.
@SoloUnity Something I have realized is that on iOS 16 the overlay buttons will not appear if the player is in a List
(that goes for the SwiftUI provided VideoPlayer
as well - must be a bug). I think I'll have to start using a LazyVStack
inside of a ScrollView
.
I can't reproduce the issue you're having, can you share the entire file? My best guess is that there's not enough available space in your design to show all of the overlay buttons. iOS will automatically remove buttons depending on the available space.
@SoloUnity Based on your code snippet, I was able to figure out that it will work in a List
if you add .shadow(radius: 0)
. I'm going to update the README with that tip.
Unfortunately, even with .shadow(radius: 0), the problem still persists on my end. In my case, the video is not in a list but in a poppet sheet / view. I have attached the file as well as the link to the project where I am using it. SkinCardDetailView.swift.zip
@SoloUnity I think the root of your problem is that you're presenting it in a sheet. When you present it in a sheet, all of the buttons are inset a bit more and the full screen button becomes a close (x) button, probably because the @Environment variable isPresented is true and that conflicts with the video players @Environment variable. This might be why SwiftUI doesn't include the full screen button by default:
@SoloUnity All that to say, I'm not sure how to fix it. I'd be interested to hear of any solutions you can come up with.
As the title says, other than that I love it!