![](https://secure.gravatar.com/avatar/24c6fa15a1411dd4ba720f1ec997946c?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
advertising xml file problem
i want to use xmldom to replace preroll.xml as below.
when i do like that "Error in "beforePlay" event handler: TypeError: a.replace is not a function(…)" this error happened.
how to solve this problem?
$.ajax({
type: "GET",
url: "assets/preroll.xml",
dataType: "xml",
success: function (xml) {
player.setup({
advertising: {
client: "vast",
tag: $(xml)
},
flashplayer: "../../jwplayer-7.7.0/jwplayer.flash.swf",
file: "<?echo $file_url?>",
width: 640,
height: 480,
autostart: true
});
}
})