Closed evrencoskun closed 2 years ago
Hi everyone, First of all, thank you for the Library.
When I use the pre-bundled version in my embedded script, it doesn't work as expected.
What could I be missing?
HTML file;
`
<!DOCTYPE HTML> <HTML> <head> <title>VAST Client JS Test</title> <script type="text/javascript" src="src/vast-client-browser.min.js" ></script> </head> <body> <div id="app"></div> <script type="text/javascript"> document.getElementById("app").innerHTML = "Hello World"; var vastClient = new VAST.VASTClient(); var tagURL = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator="; vastClient .get(tagURL) .then((res) => { document.getElementById("app").innerHTML = res; }) .catch((err) => { // Deal with the error console.log(err); document.getElementById("app").innerHTML = err; }); </script> </body> </html>
I've downloaded the vast-client-browser.min.js file and put it into the src folder.
Please check out my demo
Actually, what I'm working on is to use the pre-bundled version within the Android application, but I'm facing a similar problem there.
Hello @evrencoskun, it seems that your import are wrongs, I updated your demo with a hosted version of the build file and it works fine.
Yes, it worked for me as well. Thanks for that! @ZacharieTFR
Hi everyone, First of all, thank you for the Library.
When I use the pre-bundled version in my embedded script, it doesn't work as expected.
What could I be missing?
HTML file;
`
`
I've downloaded the vast-client-browser.min.js file and put it into the src folder.
Please check out my demo
Actually, what I'm working on is to use the pre-bundled version within the Android application, but I'm facing a similar problem there.