I am using the youtube cocoapod library to embed a video in my app. I am playing it inline. I have a requirement to take some screenshot of the app. I use the following code to take the screenshot
UIGraphicsBeginImageContext(self.view.frame.size);
view.layer.renderInContext(UIGraphicsGetCurrentContext())
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
In the generated image, the place that has the youtube video running is empty. How can I get the screenshot of the video as well ? Is it cause because, the youtube video runs inside an iframe in a webview ??