RecordRTC supports video recording in animated GIF images

You can record audio in WAV file format; and video in either WebM format
or as animated GIF image.

https://webrtc-experiment.appspot.com/RecordRTC/

var recorder = RecordRTC({
— video: HTMLVideoElement
});

// start recording gif
recorder.recordGIF();

// stop recording gif
recorder.stopGIF(function(gifURL) {
— window.open(gifURL);
});