I'm trying to load a video stream provided by a 3rd party into my site. The file linking to the stream is provided as a js file and simply writes out document.write('iframe code...')
. As the stream is domain protected so the js file has to be referenced.
This lead me to the $.ajax
/ dataType: script
and $.getScript
options. The following leaves the target div blank
$.ajaxSetup ({
cache: false
});
var stream = 'http://live.streamsupplier.com/se8ilyjs/';
$("#cam").click(function(){
$.ajax({
url: stream,
dataType: "script",
success: function(data) {
$('#cam').html(data);
alert('Load was performed.');
}
});
});
Any ideas would be most welcome.