diff --git a/dist/jsVideoUrlParser.js b/dist/jsVideoUrlParser.js index b8d95d2..1d80885 100644 --- a/dist/jsVideoUrlParser.js +++ b/dist/jsVideoUrlParser.js @@ -717,7 +717,7 @@ function Wistia() { this.provider = 'wistia'; - this.alternatives = []; + this.alternatives = ['wi']; this.defaultFormat = 'long'; this.formats = { "long": this.createLongUrl, @@ -736,7 +736,7 @@ }; Wistia.prototype.parseChannel = function (url) { - var match = url.match(/(?:(?:https?:)?\/\/)?([^.]*)\.wistia\./); + var match = url.match(/(?:(?:https?:)?\/\/)?([^.]*)\.(?:wistia\.|wi\.st)/); var channel = match ? match[1] : undefined; if (channel === 'fast' || channel === 'content') { diff --git a/dist/jsVideoUrlParser.min.js b/dist/jsVideoUrlParser.min.js index 42da5d4..bc6a7e9 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 { }); }); +test('Wistia: short urls', () => { + testUrls(newParser(), { + videoInfo: { + channel: 'appboss', + id: 'lpu6bgplle', + mediaType: 'video', + provider: 'wistia' + }, + formats: { + long: 'https://appboss.wistia.com/medias/lpu6bgplle', + embed: 'https://fast.wistia.com/embed/iframe/lpu6bgplle', + embedjsonp: 'https://fast.wistia.com/embed/medias/lpu6bgplle.jsonp', + }, + urls: [ + 'https://appboss.wi.st/medias/lpu6bgplle', + ], + }); +}); + test('Wistia: embed urls', () => { testUrls(newParser(), { videoInfo: {