window.onclickofButton= function (ID) {
$('#divEmbed').html("<embed id='teste' type='application/x-mplayer2' pluginspage='http:///www.microsoft.com/Windows/MediaPlayer/' src='video'+ID>")};
Above is my code , onclick of button i have dynamically pass video prefix number and loads video according it . This works fine for me.
But now I want to show loading image until video is loaded in to embed tag or until video taking time to ready to run.
I have seen so many solutions but i can not find any to resove this.
Note: by googling this i reached to following conclusion , is this correct or not i dont know
(i) - embed tag not support onload event
(ii) - iframe onload event supports for only html documents , not for non-html documents like .mp4 or any video extensions**
I have seen so many posts like below :
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_21214591.html
Javascript - load events for embed elements
I must have to use embed tag, not iframe or any other similars but I cannot get it to work.