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

Links to videos #60

Open
JenniBeadle opened this issue Aug 1, 2023 · 3 comments
Open

Links to videos #60

JenniBeadle opened this issue Aug 1, 2023 · 3 comments

Comments

@JenniBeadle
Copy link

Describe the bug
Links to videos have changed in Notion. I used to be able to insert a clickable link to a video. Notion now embeds the video and shows a very large preview. How do I get back to the clickable link?

Reproduction Steps

  1. I deleted the link for the embedded video.
  2. I inserted it again and asked for a bookmark.
    • The preview is smaller but I get a warning on release (see 4.)
  3. Go to Github and run a release
  4. Release fails (for other reasons) and gives warnings
    Release[standardExternalLinkConversion] Found Notion "Bookmark" link. In Notion this would show as an embed. The best docu-notion can do at the moment is replace "Bookmark" with the actual URL: [https://vimeo.com/368328862](https://vimeo.com/368328862)

URL of a source Notion page that, when docu-notion accesses or converts it, shows the problem:
Since the release fails, I can't show a URL with the problem

At least one of these:

  1. URL of a docusaurus site showing the issue (embedded videos)
    https://sillsdev.github.io/paratext-manual/2.OD
    https://sillsdev.github.io/paratext-manual/9.GL (blank space)
  2. URL of Notion page (with original markdown and bookmarks)
    https://www.notion.so/ltuse/2-Organising-your-desktop-629dc633009a45f8a2ad0618b99701a7
  3. URL of a docusuarus site showing the desired page https://manual.paratext.org/Training-Manual/Stage-1/OD

Expected behavior
Desired behaviour is clickable links to videos (with no previews) as shown in the manual.paratext.org site.
But if the bookmarks won't work then the vimeo link would be better.

@JenniBeadle
Copy link
Author

I managed to do a release so I can now give you urls.

This Notion page
https://www.notion.so/ltuse/2-Organising-your-desktop-629dc633009a45f8a2ad0618b99701a7
Has both links and bookmarks.

On this deployed page they all came out as embedded videos (no links)
https://sillsdev.github.io/paratext-manual/2.OD

@andrew-polk
Copy link
Contributor

I confirm that no matter how the user enters the vimeo link (assume the same for youtube based on the code...), docu-notion always outputs
<ReactPlayer controls url="https://{video.link}" />.

Probably we want to embed (aka use ReactPlayer) only if the user embedded in Notion?

Here's the relevant code:

export const youtubeEmbed: IPlugin = {
  name: "youtube",
  regexMarkdownModifications: [
    {
      regex: /\[.*\]\((.*youtube\.com\/watch.*)\)/, //youtube.com/watch
      imports: [`import ReactPlayer from "react-player";`],
      replacementPattern: `<ReactPlayer controls url="$1" />`,
    },
  ],
};
export const vimeoEmbed: IPlugin = {
  name: "vimeo",
  regexMarkdownModifications: [
    {
      regex: /\[.*\]\((https:\/\/.*vimeo.*)\)/,
      // we use to have the following, but the above should handle both the player an not-player urls.
      //regex: /\[.*\]\((.*player\.vimeo.*)\)/gm, // player.vimeo

      imports: [`import ReactPlayer from "react-player";`],
      replacementPattern: `<ReactPlayer controls url="$1" />`,
    },
  ],
};

@JenniBeadle
Copy link
Author

JenniBeadle commented Aug 2, 2023 via email

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

No branches or pull requests

2 participants