Show video from camera live

I’ve been working with the Ionic Framework for quite a while now, and while I have been able to find tons of tutorials and examples for taking a picture or video, I haven’t seen anyone discuss taking video from the camera and displaying it live in the app so that the user can see what they’re about to take a picture or video of. This would be essentially like the native camera app on iOS or Android where the output from the camera is displayed live while the user is getting ready to take a photo or start taking video. I understand that some people have tried to just take single pictures from the camera and update the UI several times a second to make it seem like the video is being streamed straight from the camera, yet I also understand that these attempts are usually plagued with memory leaks, crashes, and tend to have quite a low framerate, causing rough video. If anyone has experience with solving this sort of problem or might have some clues for me, thanks for your input!