-
Notifications
You must be signed in to change notification settings - Fork 43
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
Encode gif if CameraMode is set to GIF #159
Conversation
settings.feature.gifs is designed for configuring the MediaPicker I've been unable to find a scenario where the camera mode is set to .gif and we don't want a gif.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 1 nit
- tested on device using example app (do you want this tested in Orangina too? I didn't do that part)
I tried out several of the filters and "plain" gifs and didn't encounter any weirdness or bugs.
assetsHandler: | ||
handler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assetsHandler: | |
handler, | |
assetsHandler: handler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 1 nit
- tested on device using example app (do you want this tested in Orangina too? I didn't do that part)
I tried out several of the filters and "plain" gifs and didn't encounter any weirdness or bugs.
Co-authored-by: Thuy.Copeland <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while since I looked at any video export stuff but I think this makes sense. Thanks for making the change!
✅ I was able to encode GIFs without enabling the GIF setting.
Yes please if you get the chance. The PR is primarily to fix an issue on Orangina so it's probably best we test it now rather than in the Orangina PR which may require another Kanvas PR if the testing doesn't work. Unless @bjtitus did the Orangina testing in which case I think we're good to go. |
@Deco354 I just now verified the Orangina PR using that branch and the test instructions over there. Everything looks good ✅ |
I'll do this within the version bump PR |
What it does
GIFs sometimes aren't encoded when the CameraMode is set to gif. This is as there's a
settings.feature.gifs
flag we check that determines if gifs should be enabled.It's possible to use the API to trigger a CameraViewController on gif mode without having this feature on. This is a bug in itself but for the time being this PR ensures that if a user has selected the gif camera and taken a photo we always encode that gif. Prior to now the gif was coming out as a video.
I've made this function testable and added a test. The commit with the actual functionality change is below:
The fix commit
How to test
Use a real device for both tests
Example project
Tumblr Integration
Test instructions + JIRA Ticket
Etc
CC: @bjtitus I'd like your eyes on the fix commit. I'm making what I think to be a safe assumption that we'd always want to encode a gif once the user has set the camera to gif mode. If this isn't the case I may need to expand this PR to prevent us getting to this state in the first place
CHANGELOG.md
if necessary.