quick commentary

Read through some docs, and so far this is...umm... challenging even at a conceptual level.
Not sure how you want to achieve platform dependencies if you're sending code.  Plus, why send code? What about libraries of libraries of libraries?  Are we sending all the dependencies too?  Are we making a static builds of every video player with every codec for all platforms?  Why not just let the OS do its job?  And the code modification idea just blew my mind, at that moment you might as well turn off all security off, because there's no point of having it, if the content is too freely change.  I could maybe see it doable if we're talking executing in some sort of sandbox/VM/bytecode scheme that exclusively executes code that's signed and and with its integrity verified.  Changing code makes signed code impossible, so the whole idea goes out the window at that point.

I hope it's just late and I'm misunderstanding what you're trying to do here, because so far this is a hacker heaven (of the the bad variety).

Confused,
--Marcin