Based on the code snippets provided, it appears that your iOS application uses SwiftUI to create a TikTok-like user interface for playing YouTube videos. The videos are embedded within a WKWebView and the relevant UI components are built using SwiftUI.
Screen flashes white then black as the video loads, and the desired outcome is to have the video cover show with a loading icon until the video is ready to play.
- Video Cover and Loading Indicator:
- To display a loading indicator and a video cover, you can introduce a new SwiftUI
View
that overlays on top of yourSingleVideoView
. This overlay view can contain a loading indicator and an image view for displaying the video cover.
- To display a loading indicator and a video cover, you can introduce a new SwiftUI