In Android development, how to render Rive animation off-screen to video

In Android development, how to render Rive animation to video, then export the video, and see the Rive animation when playing the video