ios - Screenshot of my app shows blank youtube video -
i using youtube cocoapod library embed video in app. playing inline. have requirement take screenshot of app. use following code take screenshot
uigraphicsbeginimagecontext(self.view.frame.size); view.layer.renderincontext(uigraphicsgetcurrentcontext()) let image = uigraphicsgetimagefromcurrentimagecontext() uigraphicsendimagecontext()
in generated image, place has youtube video running empty. how can screenshot of video ? cause because, youtube video runs inside iframe in webview ??
here undocumented way this.
objc_extern uiimage *_uicreatescreenuiimage(void); // ... - (ibaction)doscreenshotbutton:(id)sender { uiimage *screenimage = _uicreatescreenuiimage(); // screenshot }
still looking api-safe alternative.
Comments
Post a Comment