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

[front] feat: add item in ShareMenu to share youtube link on mobile #1797

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

amatissart
Copy link
Member

@amatissart amatissart commented Oct 3, 2023

related to #1800

Initiated by @jstainer-kleis


Description

This PR adds a button in the ShareMenu to share link to current video on YouTube, especially useful to play the video in an alternavie app such as Newpipe.

More over, navigator.share is also used by the other items to share the link to the current page, or the custom share message to another app on mobile.

Checklist

  • I added the related issue(s) id in the related issues section (if any)
    • if not, delete the related issues section
  • I described my changes and my decisions in the PR description
  • I read the development guidelines of the CONTRIBUTING.md
  • The tests pass and have been updated if relevant
  • The code quality check pass

Comment on lines 46 to 67
if (youtubeLink && navigator.share) {
navigator.share({ url: youtubeLink });
}
Copy link
Member Author

Choose a reason for hiding this comment

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

navigator.share is not available on all browsers (e.g on Firefox desktop, or on Chromium Linux). So we should use the clipboard as a fallback, or hide the menu item completely in that case.

@amatissart amatissart changed the title newpipe share button added to videos [front] feat: add item in ShareMenu to share youtube link on mobile Nov 23, 2023
@amatissart amatissart marked this pull request as ready for review November 23, 2023 16:19
@GresilleSiffle GresilleSiffle merged commit c80184c into main Nov 30, 2023
8 checks passed
@GresilleSiffle GresilleSiffle deleted the newpipe-jst branch November 30, 2023 08:51
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.

2 participants