element-hq / element-hq/element-x-android
[Task] Implement warning dialog for sending media without transcoding
- Dominant language
- Kotlin
- Stars
- 2.4k
- Forks
- 624
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 149
Description
On the Element X clients we try to always transcode videos sent as media to H264 to ensure compatibility through our clients in every platform, but sometimes to do this we'd have to transcode a video for which the OS doesn't have the necessary codecs, or it's malformed although functional and the OS just plainly refuses to try decoding it: in these cases what we did is just silently sending the original video as a file skipping the transcoding. This can also happen when trying to get some metadata out of the video, such as the thumbnail.
This, although fixing the original 'video can't be sent' issue, has caused some friction since the fallback isn't really communicated to the user, leading to some head-scratching around this weird behaviour.
What we should do is explain the issue to the user and either (or both):
1. Ask some confirmation from the user before doing this once we detect the issue.
2. Add an option to just send the file as is in the send attachment screen.
Also, although not directly related, we'll have a similar problem if the file is too large to be uploaded: if the homeserver has a max upload size of 50MB and we try to upload a video file of 60MB we should have some way to tell the user this will fail, and maybe allow them to choose sending the video file with a higher compression/smaller dimensions.
There is also another source of issues, which is we're trying to optimise the transcoding/compression time by starting it automatically as soon as the attachment preview screen is displayed, which makes us have to check for those transcoding and compression issues while this process is running on background and then before sending. Maybe we should just remove this pre-processing? While it was better UX-wise it's getting harder to maintain it.
Contributor guide
Assessment
This issue has not been assessed yet.