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

fixing video upload from android #45

Open
nnajjar01 opened this issue Oct 8, 2022 · 0 comments · May be fixed by #50
Open

fixing video upload from android #45

nnajjar01 opened this issue Oct 8, 2022 · 0 comments · May be fixed by #50

Comments

@nnajjar01
Copy link

The problem is that snapkit package is currently unavailable to share video on Android.

actually, it's not unavailable as it is described on the package readme page, you can share the video if it's an asset only, and that is because the share function (line 200) uses the rootBundle to load the video
The solution is too simple just replace this line:
ByteData byteData = await rootBundle.load(videoPath!);
with this line:
Uint8List byteData = await File(videoPath!).readAsBytes();

now we can call the share function and just give it the video path.

@TimmyRB TimmyRB linked a pull request Feb 8, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant