- Issue created by @Grevil
- 🇩🇪Germany Grevil
Basically, we want to return a simple Json response in the example that looks a bit like this:
{ "version": "1.0", "type": "video", "provider_name": "YouTube", "provider_url": "https://youtube.com/", "width": 425, "height": 344, "title": "Amazing Nintendo Facts", "author_name": "ZackScott", "author_url": "https://www.youtube.com/user/ZackScott", "html": "<object width=\"425\" height=\"344\"> <param name=\"movie\" value=\"https://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param> <param name=\"allowFullScreen\" value=\"true\"></param> <param name=\"allowscriptaccess\" value=\"always\"></param> <embed src=\"https://www.youtube.com/v/M3r2XDceM6A&fs=1\" type=\"application/x-shockwave-flash\" width=\"425\" height=\"344\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed> </object>", }
Except, that we won't use the legacy "object" element in the html, but an iframe instead (with the "sandbox" attribute of course). Checkout "WidgetJsonExample" for reference.
- 🇩🇪Germany Anybody Porta Westfalica
@grevil: Let's talk about this first. I don't understand what you mean by example. Shouldn't we instead perhaps add an oembed endpoint submodule, if it helps?
See https://www.hashbangcode.com/article/drupal-9-content-sharing-between-dr...
The oembed json is individual per oembed entity, so an example wouldn't help much, I guess?
But first let's discuss, which advantages this would bring anyway.