Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switchToPreviewFrame not working on iOS #19

Open
disbelief opened this issue Mar 23, 2020 · 1 comment
Open

switchToPreviewFrame not working on iOS #19

disbelief opened this issue Mar 23, 2020 · 1 comment

Comments

@disbelief
Copy link

Meta: sorry for all the tickets from me lately. I'm happy to pitch in and fix this myself, but could use a little guidance since I'm new to this library. Perhaps I'm doing something wrong?

I'm trying to build a "picture in picture" UI where the video recorder can either be in a small frame on top of the main content of my app, or it can be fullscreen with the content of my app in the small frame.

After my changes in PR #18 I have the behaviour working on web, but on iOS it does not work (I haven't tried android yet). The second frame never appears, and the original one does not disappear.

I'm not sure if this is a bug, or if swithcToPreviewFrame doesn't work like this and maybe I'd be better off destroying the VideoRecorder and creating a new one for these two states?

As illustration, here's how it looks on web:

Web 1

screeenshot1

Web 2

Screen Shot 2020-03-23 at 17 50 26


On iOS however, the recording frame never seems to switch:

iOS 1

screenshot3

iOS 2

screenshot4

@disbelief
Copy link
Author

Another data point: I refactored my code to use VideoRecorder.editPreviewFrameConfig and it works as expected on iOS. So instead of initializing my VideoRecorder with two preview frame configs, I just initialize with one and then modify its attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant