@ormoshe/js-video-url-parser 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jsVideoUrlParser.js
CHANGED
|
@@ -1577,11 +1577,18 @@
|
|
|
1577
1577
|
};
|
|
1578
1578
|
}
|
|
1579
1579
|
|
|
1580
|
+
Voomly.prototype.parseUrl = function(url) {
|
|
1581
|
+
var match = url.match(
|
|
1582
|
+
/(?:v|embed)\/([a-zA-Z\d]+)/i
|
|
1583
|
+
);
|
|
1584
|
+
return match ? match[1] : undefined;
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1580
1587
|
Voomly.prototype.parse = function(url, params) {
|
|
1581
1588
|
var result = {
|
|
1582
1589
|
mediaType: this.mediaTypes.VIDEO,
|
|
1583
1590
|
params: params,
|
|
1584
|
-
id: this.parseUrl(url)
|
|
1591
|
+
id: this.parseUrl(url)
|
|
1585
1592
|
};
|
|
1586
1593
|
return result.id ? result : undefined;
|
|
1587
1594
|
};
|
package/lib/provider/voomly.js
CHANGED
package/package.json
CHANGED