some webrtc functions snapshot and video capture from mozilla web site