Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

brol1dev
Copy link
Contributor

@brol1dev brol1dev commented Feb 4, 2021

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.

The web iFrame embedded player uses Javascript "window.open" to open the URL for UI elements like the video title and YT logo. WKWebView ignores this navigation by default, so this CL adds the necessary logic to link to the YT main app.
@todd-patterson todd-patterson merged commit 35159c1 into youtube:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants