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.


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


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

This site uses Akismet to reduce spam. Learn how your comment data is processed.