SvenTiigi / YouTubePlayerKit

A Swift Package to easily play YouTube videos 📺
https://sventiigi.github.io/YouTubePlayerKit/
MIT License
717 stars 64 forks source link

webContentProcessDidTerminate #33

Closed davidnorris78 closed 2 years ago

davidnorris78 commented 2 years ago

YouTubePlayerKit Environment

What did you do?

Implemented the YoutubePlayerKit as per the instructions on GitHub. It is a macOS app using SwiftUI.

let youTubePlayer: YouTubePlayer = "https://youtube.com/watch?v=psL_5RIBqnY"

var body: some View {
    //  WWDC 2019 Keynote
    YouTubePlayerView(self.youTubePlayer) { state in
                // Overlay ViewBuilder closure to place an overlay View
                // for the current `YouTubePlayer.State`
                switch state {
                case .idle:
                    ProgressView()
                case .ready:
                    EmptyView()
                case .error(let error):
                    Text(verbatim: "YouTube player couldn't be loaded: \(error)")

                }
            }
}

What did you expect to happen?

Youtube vIdeo would load and allow me to play it.

What happened instead?

I got the message back from state saying 'webContentProcessDidTerminate'

davidnorris78 commented 2 years ago

Fixed the issue. Missed the small print