360 Live Preview - Theta V

Hello!
I want to implement 360 live preview in my mobile application (iOS / ReactNative)
Like to this app: https://apps.apple.com/ru/app/ricoh-theta/id1023254741
The APP has functionality for 360 live preview before capture.

I tried implementing this functionality with help GitHub - lightbasenl/react-native-panorama-view: A simple component for displaying panoramic image library, but it had a failure at duration after streaming ~ 30-60sec application has frozen and has CPU overload ~ 250%

Community,
Do you have any ideas for implement this functionality?

Or mb you have some example for it

I will be grateful for a prompt response

example with dart

based on this:

GitHub - alexeyismirnov/flutter_mjpeg: MJPEG video streaming for Flutter

Explanation of the MotionJPEG frames

https://drive.google.com/file/d/1y1FDqOHa3OanMW2fUKCFJ4nZMcGh0wn2/view

Have not tested with JavaScript

working JavaScript example