I have a video (say clip.mp4 or clip.webm) which I need to play on the html5 video tag () Now I have obfuscated the first few bytes of clip.mp4 (basically applied a simple XOR function).
Now can I de-obfuscate (as in apply an XOR on the XOR'ed bytes) in Javascript and give the clip to the video tag?
Does JavaScript currently provide the capability to do that? If so, what should I do? What are the general directions I should follow in order to get this working?
I came across a cross platform compiler called Emscripten. Quoting from their site : "Emscripten is an open source LLVM to JavaScript compiler. With it, you can compile C and C++ code into JavaScript and run it on the web" Can this do the job? What steps do I have to take to get this running?