Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
fix: add support for YT shorts (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes authored Jan 19, 2023
1 parent 8f63c88 commit ad1dc84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube-video-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const API_URL = 'https://www.youtube.com/iframe_api';
const API_GLOBAL = 'YT';
const API_GLOBAL_READY = 'onYouTubeIframeAPIReady';
const MATCH_SRC =
/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/;
/(?:youtu\.be\/|youtube\.com\/(?:shorts\/|embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/;

const templateShadowDOM = document.createElement('template');
templateShadowDOM.innerHTML = `
Expand Down

0 comments on commit ad1dc84

Please sign in to comment.