JavaScript library that can create animated gifs from video streams (e.g. webcam), existing videos (e.g. mp4), or existing images
gifanimated gifWebRTCgetUserMedia
https://yahoo.github.io/gifshot/