Simcha
Simcha

Reputation: 3400

Google ima3.js via require.js

how can I include Google library ima3.js to my module using require.js?

I'm trying like this, but unsuccesfully:

define(['uiBase', 'base', 'const', 'https://s0.2mdn.net/instream/html5/ima3.js'], function (UIBase, Base, Const, AdSDK) {
function Ad (params) {
    var params = params || {};

    /*-- Section to build ui elements --*/
      var adsLoader = new AdSDK.google.ima.AdsLoader(adDisplayContainer);
    /*-- End of section --*/
    };
return Ad;
});

Upvotes: 0

Views: 853

Answers (1)

Simcha
Simcha

Reputation: 3400

I found an answer. If it will be usefull to someone: All this code are work correcly, just to call ima functions I need to call them as:

var adsLoader = new google.ima.AdsLoader(adDisplayContainer);

Upvotes: 1

Related Questions