feat: embed youtube videos #13

Merged
verbiricha merged 2 commits from youtube into main 2023-01-06 22:21:43 +00:00
verbiricha commented 2023-01-06 17:02:03 +00:00 (Migrated from github.com)
No description provided.
cloudflare-pages[bot] commented 2023-01-06 17:02:27 +00:00 (Migrated from github.com)

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11c5dc0
Status:   Deploy successful!
Preview URL: https://c88be389.snort-social.pages.dev
Branch Preview URL: https://youtube.snort-social.pages.dev

View logs

## Deploying with &nbsp;<a href="https://pages.dev"><img alt="Cloudflare Pages" src="https://user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png" width="16"></a> &nbsp;Cloudflare Pages <table><tr><td><strong>Latest commit:</strong> </td><td> <code>11c5dc0</code> </td></tr> <tr><td><strong>Status:</strong></td><td>&nbsp;✅&nbsp; Deploy successful!</td></tr> <tr><td><strong>Preview URL:</strong></td><td> <a href='https://c88be389.snort-social.pages.dev'>https://c88be389.snort-social.pages.dev</a> </td></tr> <tr><td><strong>Branch Preview URL:</strong></td><td> <a href='https://youtube.snort-social.pages.dev'>https://youtube.snort-social.pages.dev</a> </td></tr> </table> [View logs](https://dash.cloudflare.com/?to=/:account/pages/view/snort-social/c88be389-b26c-4ddc-ac30-7d62c3faa936)
v0l (Migrated from github.com) reviewed 2023-01-06 18:37:56 +00:00
@ -6,1 +6,4 @@
function transformHttpLink(a) {
try {
const url = new URL(a);
v0l (Migrated from github.com) commented 2023-01-06 18:37:49 +00:00

I would make this a separate function to iterate over fragments and have another Regex to parse the youtube links, can see this being the case for other sources in the future too

I would make this a separate function to iterate over fragments and have another Regex to parse the youtube links, can see this being the case for other sources in the future too
v0l commented 2023-01-06 18:40:28 +00:00 (Migrated from github.com)
We could also add some breaks around this: https://ab0a921a.snort-social.pages.dev/e/note1mju85jc587326vqgjkkn9f4sy5c4a578azayzhy4q0f54m4qslusfehluj
v0l commented 2023-01-06 18:41:47 +00:00 (Migrated from github.com)

Also styling should be extended for youtube iframes
7831bdbcc2/src/element/Note.css (L25-L28)

Also styling should be extended for youtube iframes https://github.com/v0l/snort/blob/7831bdbcc28a46eea436afa32d0db252df200c13/src/element/Note.css#L25-L28
verbiricha commented 2023-01-06 20:39:50 +00:00 (Migrated from github.com)

@v0l addressed your comments, I think is best to transform HTTP links in one pass, added a better regex for extracting youtube vid ids.

@v0l addressed your comments, I think is best to transform HTTP links in one pass, added a better regex for extracting youtube vid ids.
Sign in to join this conversation.
No description provided.