iamcal / oembed

The oEmbed Spec
http://oembed.com
MIT License
1.31k stars 643 forks source link

YouTube short share scheme missing #759

Closed phonoman closed 2 months ago

phonoman commented 2 months ago

Issue:

Currently, the YouTube short provided share link https://youtube.com/shorts/<id> does not fit any of the oembed scheme patterns. image

  - schemes:
    - https://*.youtube.com/watch*
    - https://*.youtube.com/v/*
    - https://youtu.be/*
    - https://*.youtube.com/playlist?list=*
    - https://youtube.com/playlist?list=*
    - https://*.youtube.com/shorts*
    - https://*.youtube.com/embed/*

There's only a pattern for www variant, which is not YouTube default behaviour.

Background:

I'm coming from Drupal where this causes the error "No matching provider found." since there are no endpoint/scheme hits.

Solution:

Add pattern to scheme list

    - https://youtube.com/shorts*

EDIT: Later realised I could've just opened a PR instead (https://github.com/iamcal/oembed/pull/760).