We have released a screen recorder extension on our GitHub page. The extension was originally developed by @sergey.lerg, with some modifications from the Defold team.
One of the key features of this extension is the ability to save just last N seconds of the gameplay. The extension maintains a circular buffer for encoded data and saves it when requested. On Android, macOS, Linux, Windows and HTML5 the circular encoder stores it’s data in memory, on iOS the circular encoder saves to temporary video files and then joins them together to produce desired duration.
Audio capture is not implemented, however the extension provides a function to mux a prepared audio file with the captured video.