I think I know what was my problem but I couldn't find a solution for it.
On my app, you can see that there is a YouTube video, but when you click on it, it won't play the video. Here's the line of code that may cause the issue:
webView.loadHTMLString(partyRock.videoURL, baseURL: nil)
Why are you using
loadHTMLString? This property sets the main page content and base URL and I don't think you want to do that.
Use this instead:
let requestURL = URL(string: partyRock.videoURL) let request = URLRequest(url: requestURL!) webView.loadRequest(request)