element-hq / element-hq/element-ios

Video thumbnail has wrong orientation

Open
#4,544 5 comments 0 reactions 0 assignees View on GitHub
A-Timeline Z-Papercuts
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

**Describe the bug**
I received a horizontal video that was sent from element-iOS (iPhone). The metadata seems incorrect and the thumbnail is thus displayed as a mix of vertical and horizontal video in android (but plays correctly).

On desktop the thumbnail is shown correctly. On android, a vertical space is reserved for the thumbnail. Play button is centered on that space. The upper ~third shows the first video frame, horizontally (correctly orientated regarding video contents), leaving the lower 2/3 of the reserved space empty.

I believe this is (mainly) an element-iOS and not -android bug due to the `h` and `w` fields, although desktop seems to get around it somehow (`thumbnail_info`?).

```
{
"room_id": "!redacted",
"type": "m.room.message",
"content": {
"body": "Video",
"info": {
"thumbnail_file": {
"iv": "redacted",
"hashes": {
"sha256": "Up48HNoU16IurpUIsvI+IktFcCuIFCZ1IyzLAIzW7e8"
},
"key": {
"k": "redacted",
"ext": true,
"key_ops": [
"encrypt",
"decrypt"
],
"alg": "A256CTR",
"kty": "oct"
},
"url": "mxc://redacted",
"v": "v2"
},
"h": 568,
"mimetype": "video/mp4",
"duration": 7733,
"w": 320,
"thumbnail_info": {
"size": 578826,
"mimetype": "image/jpeg",
"w": 1920,
"h": 1080
}
},
"file": {
"iv": "redacted",
"hashes": {
"sha256": "4Ua3gsGvmKlx1WgmbFZeXpnAU/xGNUPDxRBcVRlPclk"
},
"key": {
"k": "redacted",
"ext": true,
"key_ops": [
"encrypt",
"decrypt"
],
"alg": "A256CTR",
"kty": "oct"
},
"url": "mxc://redacted",
"v": "v2"
},
"msgtype": "m.video"
}
}
```

**To Reproduce**
?

**Expected behavior**
conform to spec

**Screenshots**
redacted

**Smartphone (please complete the following information):**
unknown, but supposedly current iOS, current appstore version, iPhone >=X

**Additional context**
Viewing android app is schildichat beta/nightly 1.1.12.sc37-test13 [40100543] (F-7d377ea4) from spiritcroc's beta f-droid repo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.