You are right. I shouldn't modify this vendor file. I've taken a closer look at the issue, and the explanation is simple. We use $.getScript to fetch dependencies. From the JQuery doc of $.getScript: *The callback is fired once the script has been loaded but not necessarily executed.* Basically, the promise is resolved too fast, and the next scripts are  fetched. The ooyala script is loaded, but no executed yet because it is encapsulated in a function: *(function() { ...})();*. I'm wondering what could be a safe way to handle dependencies in jquery-xblock then...