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'
YouTubePlayerKit Environment
What did you do?
let youTubePlayer: YouTubePlayer = "https://youtube.com/watch?v=psL_5RIBqnY"
What did you expect to happen?
What happened instead?