Good afternoon,
I am currently a jwplayer user with commercial license and I am trying to build up a web app using dynamic JWPlayer Single-Line Embed.
Ex:
Based on the video is selected, different MEDIAID is feeding to the html page. However, I have tried variety method, including create a script placeholder on my html but it doesn't seem to work. I am always getting this error for some reasons and I couldnt be able to work around.
The error that I get is
"Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened."
"uncaught typeerror jwplayer(...).setup is not a function"
This is what I have so far for testing purpose:
index.html
....
app.js
app.controller('HomeCtr', function ($scope) {
console.log("I am in HomeCtr ");
$scope.player = "AAAAAA-BBBBBB.js?sig=CCCCCCCCCCCC&exp=DDDDDDD"
OR
// var fileref = document.createElement('script');
// fileref.setAttribute("type", "text/javascript");
// fileref.setAttribute("src", "//content.jwplatform.com/players/AAAAAA-BBBBBB.js?sig=CCCCCCCCCCCC&exp=DDDDDDD);
// alert(fileref);
// document.getElementsByTagName("head")[0].appendChild(fileref);
Any helps will be appreciated
↧