Removing filmstrip codes, I changed the newmedia events in CameraController.
All pre-processing about thumbnail and preview is in CameraController or lib/camera.js.
The preview gallery also received the exist 'newimage' and 'newvideo' events with required data.