Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use oEmbed for YouTube Shorts (#15025)
Browse files Browse the repository at this point in the history
It seems that YouTube Short previews do not work in some
regions, but the oEmbed information for those areas is still
valid.

This causes YouTube Shorts to always use (only) the oEmbed
endpoint which is a minor regression for regions where the URL
preview was already working -- some of the additional video
metadata is lost. It is not likely that clients are using this today
and it is more beneficial to have a limited preview working everywhere
than unused metadata in the Open Graph response.
  • Loading branch information
SuperSandro2000 authored May 3, 2023
1 parent 1d6140e commit 5f88228
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/15025.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use oEmbed to generate URL previews for YouTube Shorts.
13 changes: 13 additions & 0 deletions synapse/res/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,18 @@
"url": "https://publish.twitter.com/oembed"
}
]
},
{
"provider_name": "YouTube Shorts",
"provider_url": "http://www.youtube.com/",
"endpoints": [
{
"schemes": [
"https://youtube.com/shorts/*",
"https://*.youtube.com/shorts/*"
],
"url": "https://www.youtube.com/oembed"
}
]
}
]

0 comments on commit 5f88228

Please sign in to comment.