@ormoshe/js-video-url-parser 0.5.4 → 0.5.5

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.
@@ -1624,7 +1624,7 @@
1624
1624
 
1625
1625
  Spotlightr.prototype.parseUrl = function(url) {
1626
1626
  var match = url.match(
1627
- /(?:watch)\/([a-zA-Z\d]+)/i
1627
+ /(?:watch|embed)\/([a-zA-Z\d]+)/i
1628
1628
  );
1629
1629
  return match ? match[1] : undefined;
1630
1630
  };
@@ -15,8 +15,9 @@ module.exports = Spotlightr;
15
15
 
16
16
  Spotlightr.prototype.parseUrl = function(url) {
17
17
  var match = url.match(
18
- /(?:watch)\/([a-zA-Z\d]+)/i
18
+ /(?:watch|embed)\/([a-zA-Z\d]+)/i
19
19
  );
20
+ //var match = url.match(/(?:\/(\d+))?\/watch(?:\/.*?)?\/(\d+)/i);
20
21
  return match ? match[1] : undefined;
21
22
  };
22
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ormoshe/js-video-url-parser",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "A parser to extract provider, video id, starttime and others from YouTube, Vimeo, ... urls",
5
5
  "main": "lib/index.js",
6
6
  "browser": "dist/jsVideoUrlParser.js",