Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to WKWebView instead of UIWebView (#362)
* Change kYTPlayerStateQueued to kYTPlayerStateCued The public documentation uses the word cued instead of queued: https://developers.google.com/youtube/iframe_api_reference#Events. * Replace UIWebView for WKWebView. Replaced all references to UIWebView with WKWebView. Had to change APIs, most of the work is that the JS calls that return values, e.g. getDuration() are now async. All methods that expect a return value now use a callback for the expected async result. * Remove deprecated quality methods. All methods related to quality have been deprecated and removed: https://developers.google.com/youtube/iframe_api_reference#october-24,-2019 * Fix internal returned type for async APIs. UIWebView used to always returned the JS result as an NSString, but with WKWebView the type is inferred when returned making it so that the current logic of stringFromEvaluatingJavaScript:completionHandler: is not sufficient to capture the types returned by the iFrame API.
- Loading branch information