diff --git a/react/components/ProductImages/components/Video/Youtube.js b/react/components/ProductImages/components/Video/Youtube.js index 1c412eb3a..b731b0a81 100644 --- a/react/components/ProductImages/components/Video/Youtube.js +++ b/react/components/ProductImages/components/Video/Youtube.js @@ -25,15 +25,15 @@ class Youtube extends Component { static extractVideoID = url => { const regExp = - /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/ - + /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?)|(shorts\/))\??v?=?([^#&?]*).*/ + const match = url.match(regExp) - - if (match && match[7].length === 11) return match[7] - + + if (match && match[8].length === 11) return match[8] + return null } - + executeCommand = command => () => { if (!this.frameReady) return