summary refs log tree commit diff
path: root/synapse/res/providers.json
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-05-03 18:54:42 +0200
committerGitHub <noreply@github.com>2023-05-03 12:54:42 -0400
commit5f8822854d0427d132674615f13becf420c57bd2 (patch)
tree7348f41cfcd7ae18ec3f8494a40599ca3e08b302 /synapse/res/providers.json
parentAdd `xmlsec` package to flake.nix (#15532) (diff)
downloadsynapse-5f8822854d0427d132674615f13becf420c57bd2.tar.xz
Use oEmbed for YouTube Shorts (#15025)
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.
Diffstat (limited to 'synapse/res/providers.json')
-rw-r--r--synapse/res/providers.json13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/res/providers.json b/synapse/res/providers.json
index 7b9958e454..2dc9fec8e3 100644
--- a/synapse/res/providers.json
+++ b/synapse/res/providers.json
@@ -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"
+            }
+        ]
     }
 ]