Skip to content

Commit

Permalink
feat: Support wistia short links
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikApm committed Nov 2, 2023
1 parent 82af884 commit 8df5181
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/jsVideoUrlParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@

function Wistia() {
this.provider = 'wistia';
this.alternatives = [];
this.alternatives = ['wi'];
this.defaultFormat = 'long';
this.formats = {
"long": this.createLongUrl,
Expand All @@ -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') {
Expand Down
Loading

0 comments on commit 8df5181

Please sign in to comment.