mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 08:41:11 +08:00
We currently rely on Open Graph data to render YouTube oneboxes.
However, YouTube does not always give us a response with the Open Graph
data necessary, leading to empty preview HTML like this that shows
as a broken image in the composer:
```
<img src="" width="480" height="360" title=" - YouTube" style="aspect-ratio: 480 / 360;">
```
In addition, our old method of parsing YouTube script tags for JSON
which contains information for the video, introduced in
|
||
|---|---|---|
| .. | ||
| engine | ||
| mixins | ||
| templates | ||
| domain_checker.rb | ||
| engine.rb | ||
| file_type_finder.rb | ||
| helpers.rb | ||
| json_ld.rb | ||
| layout.rb | ||
| layout_support.rb | ||
| matcher.rb | ||
| movie.rb | ||
| normalizer.rb | ||
| oembed.rb | ||
| open_graph.rb | ||
| preview.rb | ||
| sanitize_config.rb | ||
| status_check.rb | ||
| template_support.rb | ||
| view.rb | ||