Play swf file using Embed or Object tag

I am trying to play local swf or flash files on my webpage. I ask client for file input, convert it into data uri and use data uri as source for embed tag or object tag, but it is not working. Please tell me what is wrong with my code.

HTML

<input id="swf_file" type="file" accept="/*" />
<Embed id="swf_player" />

Javascript

swf_file.onchange = function(){
    var files = this.files;
    var file = URL.createObjectURL(files[0]); 
    swf_player.src = file; 

};

Thanks for reading…


Source: javascript

Leave a Reply