Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit e9dbe9e

Browse files
author
Eric Vargas
authored
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.
1 parent f6b71a7 commit e9dbe9e

File tree

2 files changed

+391
-393
lines changed

2 files changed

+391
-393
lines changed

0 commit comments

Comments
 (0)