feat(extension/youtube): Allow youtube shorts urls to be embedded #4490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe your changes
Youtube uses /shorts/ for their shorts video. The /embed url works with these id's, the regex did not support them though.
How did you accomplish your changes
This updates the videoId regex to also support the /shorts/ urls.
How have you tested your changes
Tested with several youtube urls
youtu.be link: https://youtu.be/vwXeKbL_k6w?si=jPPIRP8x_0h1RU71
youtube.com embed link: https://www.youtube.com/embed/vwXeKbL_k6w
for example this short: https://youtube.com/shorts/5toiGG5I9yM?si=N6idQiwCYltCKpDC
How can we verify your changes
[add a detailed description of how we can verify your changes here]
Remarks
[add any additional remarks here]
Checklist
Related issues
Fixes #3582