Add onerror handling for img/video loading.

Actually I tested with Chrome and Firefox.  both video.addEventListener('error', ...) and video.onerror= works fine. SoI'll stick to the original code.