youtube / youtube-ios-player-helper

Lightweight helper library that allows iOS developers to add inline playback of YouTube videos through a WebView
Other
1.64k stars 680 forks source link

Handle Javascript-based navigation for iFrame player in WKWebView #425

Closed brol1dev closed 3 years ago

brol1dev commented 3 years ago

The web iFrame embedded player may use Javascript to open the URL for some UI elements. WKWebView ignores this navigation by default, so this change adds the logic to link to the YT app.

Tested on iPhone 12 Simulator, iOS 14.4. Verified that tapping on the video title links you to YT app site on Safari. Would redirect you to the YT main app if it was installed on the device.