How to make camera preview like in telegram?

Hi everyone!

How can I make camera preview like in telegram, i.e. make it in a separate element? I used the plugin
@capacitor-community/camera-preview and next.js framework

The isBack: true solution doesn’t work for me because it only works on android