Jump to content
Search Community

Conflict between GSAP 3 and VideoJS

gmullinix test
Moderator Tag

Recommended Posts

It looks like VideoJS has this line of code in its source:

window$1 = window$1 && window$1.hasOwnProperty('default') ? window$1['default'] : window$1;

Which basically looks for any "default" declared on the window and if it finds one, it treats THAT as the window itself! GSAP's UMD/ES5 files export a default object as a convenience for folks that use build systems that require() or import. So when you loaded GSAP before VideoJS, that caused VideoJS to stumble and treat GSAP as if it was the window object itself. I'd say that's more of a problem with VideoJS than GSAP, but I'll go ahead and add some conditional logic that removes the default from the window if the exports object is set to the window itself. You can preview that in the upcoming release here: https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js

 

That seems to work well in your codepen demo (thanks for providing that by the way!)

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...