linagora / twake-on-matrix

A multi-platform (Flutter) application for connecting to Matrix - an open network for secure, decentralized communication, with your favorite devices.
GNU Affero General Public License v3.0
64 stars 18 forks source link

TW-1901: crash app when open play video mobile #1979

Closed sherlockvn closed 4 months ago

sherlockvn commented 4 months ago

Ticket

Related issue

1901

Root cause

If this is a bug, please provide a brief description of the root cause of the issue Sometimes the thumbnail of video is not an image (this is due to testing or old video or maybe come from another platform), so that when display to screen, it will throw an exception during decode the image. image

Solution

Outline the implemented solution, detailing the changes made and how they address the issue Now when create a thumbnail, we will add the extension which indicate its an image, and in the receiver side, if the thumbnail is not the image, we will throw an exception and handle the exception.

Impact description

If this is not a bug, please explain how the changes affect the project

Test recommendations

Recommendations for how to test this, or anything else you are worried about? Try to send video and image in both normal chat and encrypted chat

Pre-merge

Does anything else need to be done before merging?

Resolved

Attach screenshots or videos demonstrating the changes

https://github.com/user-attachments/assets/4bd42166-e03b-48d7-ac92-a90f0a24b870

https://github.com/user-attachments/assets/d4427093-aab3-49d4-a367-aaae51554a59

https://github.com/user-attachments/assets/e204565f-4f22-4382-a240-364960769f3c

github-actions[bot] commented 4 months ago

This PR has been deployed to https://linagora.github.io/twake-on-matrix/1979