Can I invoke a URL, directly from javascript without using AJAX,on click of a play button, i am calling the playAlbumFromMediaUrl().
function playAlbumFromMediaUrl() {
var trackMasterList = document.audioDetails.trackMasterIdList.value;
var stringUrl = trackMasterList.split('::');
for (var i = 0; i < stringUrl.length - 1; i++) {
playlist[i] = {
file: stringUrl[i],
provider: "/teams/web/jwplayer/AkamaiAdvancedJWStreamProvider.swf"
}
}
setTimeout(function () {
jwplayerSetupForPlayAlbum();
}, 1000);
}
function jwplayerSetupForPlayAlbum() {
jwplayer('html5AudioPlayer').setup({
playlist: [{
file: "http://localhost:8080/servlet/MediaLibraryAccessServlet?trackMasterId=898035&isProtocol=rtmpe&assetFormat=MP448Full",
provider: "/teams/web/jwplayer/AkamaiAdvancedJWStreamProvider.swf"
}],
width: 550,
height: 30
}).play();
}
Once the url is invoked,it calls the MediaLibraryAccess servlet class that returns a mp4 url, that can be played by the jwplayer.
I need to invoke the servlet url,without using AJAX. For simplicity, i am not looping the playlist,instead i hard coded the servlet URL call in the jwplayer file attribute.
Can anyone help with this.