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

Open YouTube video on a browser or YouTube app (iOS only) #300

Merged
merged 2 commits into from Jul 1, 2023

Conversation

Yupeng-li
Copy link
Contributor

@Yupeng-li Yupeng-li commented Jun 29, 2023

Fixes issue #220 , so that a user can open YouTube video on a browser or YouTube app by tapping on the title or the YouTube logo on the player.

The reason why it works on Android is mentioned here. https://github.com/react-native-webview/react-native-webview/releases/tag/v11.0.0

…he title or the YouTube logo on the player
const isYouTubeLink = url.startsWith('https://www.youtube.com/');
if (isYouTubeLink) {
Linking.openURL(url).catch(error => {
console.error('Error opening URL:', error);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd probably make this a console.warn rather than an error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. I've updated and pushed.

@LonelyCpp
Copy link
Owner

looks good :)

@LonelyCpp LonelyCpp merged commit 88e816c into LonelyCpp:master Jul 1, 2023
1 check passed
@LonelyCpp
Copy link
Owner

this has been published with v2.3.0 🚀

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