Zod- / jsVideoUrlParser

A javascript parser to extract informations like provider, channel, id, start time from YouTube, Vimeo, Dailymotion, Twitch,... urls
MIT License
235 stars 73 forks source link

Vimeo class in global namespace clashes with Vimeo class official Vimeo player. #25

Closed mrwokkel closed 8 years ago

mrwokkel commented 8 years ago

The Vimeo plugin has the class Vimeo. When installed via bower it resides in the global namespace where it clashes official vimeo player which also uses Vimeo. My quick and dirty solution is to wrap only the plugins in:

(function() {
  // plugins
}).call(this);
Zod- commented 8 years ago

Could also rename all the plugins to something like VimeoParserPlugin. Not sure what would be considered as a good solution here.

mrwokkel commented 8 years ago

Another option is to change the grunt build (where the concatenation of the plugins files is wrapped in an anonymous function. Or maybe wrap everything and do

window.urlParser = new UrlParser();

When using it via bower it won't pollute the global namespace whatever names are used.

Zod- commented 8 years ago

I've been away on holiday for a while. I will work on this soon.

Zod- commented 8 years ago

@rubylibre This should be it if you want to take a look: #27