Update the currentFrameConfig when switchToPreviewFrame changes configs #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was running into a problem when toggling between two different preview frame configs using the
VideoRecorder.switchToPreviewFrame({ id: 'someId' })
function.The problem is, while
switchToPreviewFrame
does update the configuration correctly, it does not update it's internal pointer to thecurrentFrameConfig
. Thus, if I want to know what the currentFrameConfig is after switching, it can no longer be relied upon to be accurate.I'm sure there are probably some build steps and/or spec changes that are necessary to ship with this PR but wanted to propose the logical change first.