diff --git a/dist/jsVideoUrlParser.js b/dist/jsVideoUrlParser.js index b8d95d2..473bdc7 100644 --- a/dist/jsVideoUrlParser.js +++ b/dist/jsVideoUrlParser.js @@ -641,7 +641,7 @@ }; Vimeo.prototype.parseHash = function (url) { - var match = url.match(/\/\d+\/(\w+)$/i); + var match = url.match(/\/\d+\/(\w+)(?:\?|$)/i); return match ? match[1] : undefined; }; diff --git a/dist/jsVideoUrlParser.min.js b/dist/jsVideoUrlParser.min.js index 42da5d4..1586bc2 100644 --- a/dist/jsVideoUrlParser.min.js +++ b/dist/jsVideoUrlParser.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).urlParser=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=function(t,i){if("object"!==e(t))return"";var r="",a=0,s=Object.keys(t);if(0===s.length)return"";for(s.sort(),i||(r+="?"+s[0]+"="+t[s[0]],a+=1);a { '//player.vimeo.com/video/36881035?h=f9ad567296', ], }); + testUrls(newParser(), { + videoInfo: { + provider: 'vimeo', + id: '36881035', + mediaType: 'video', + params: { + hash: 'f9ad567296', + share: 'copy', + }, + }, + formats: { + long: 'https://vimeo.com/36881035/f9ad567296?share=copy', + embed: '//player.vimeo.com/video/36881035?h=f9ad567296&share=copy', + }, + urls: ['https://vimeo.com/36881035/f9ad567296?share=copy', + '//player.vimeo.com/video/36881035?h=f9ad567296&share=copy', + ], + }); testUrls(newParser(), { videoInfo: { provider: 'vimeo',