Skip to content

Commit

Permalink
updated regex
Browse files Browse the repository at this point in the history
  • Loading branch information
djamg committed Oct 17, 2023
1 parent eab1da0 commit 4943b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion funnel/assets/js/utils/embedvideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Video = {
*/
getVideoTypeAndId(url) {
const regexMatch = url.match(
/(http:|https:|)\/\/(player.|www.)?(?<service>y2u\.be|vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|live\/|watch\?v=|v\/)?(?<videoId>[A-Za-z0-9._%-]*)(&\S+)?(\?h=(?<paramId>[^&]+))?/
/(http:|https:|)\/\/(player.|www.)?(?<service>y2u\.be|vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|live\/|watch\?v=|v\/)?(?<videoId>[A-Za-z0-9._%-]*)(&\S+)?((\?h=)(?<paramId>[^&]+))?/
);
let type = '';
if (regexMatch && regexMatch.length > 5) {
Expand Down

0 comments on commit 4943b06

Please sign in to comment.