Bug 1023179  - Fix video unloading/loading, refactor initialization

Refactor of initialization sequence, logging to track down media loading issue
just a question about this, why are we using event listeners for the video, but inline events for images? any specific reason?