Closed bitdessert closed 9 months ago
@amyblais Everything seems to be fixed in 17.1. Download, play, and preview all work fine. However, for the preview, it takes 2 download attempts to see the preview, and I checked the cause and it's a permission issue. The authtoken seems to be missing in the header, are there any issues with this?
The file is located at video_file.tsx and the source code is the following
const videoUrl = buildFileUrl(serverUrl, data.id!);
I changed this to
const publicLink = await fetchPublicLink(serverUrl, data.id!); const videoUrl = publicLink.link;
Alternatively, can you tell me how I can access the bearerToken? If I can figure that out, I think I can do something like this
const {path: uri, height, width} = await createThumbnail({url: data.localPath || videoUrl, timeStamp: 2000, headers:{Authorization:'BEARER ${beareToken}'}});
However, even in this case, there is a problem. The server throws a file size error. The error message is related to the following
NSLocalizedFailureReason=The server is not correctly configured., NSLocalizedDescription=Operation Stopped
Do you see these errors?
It could be an issue with the server configuration we're deploying, but I don't have any modifications to make, and I think it's caused by the server not supporting HTTP Range Requests.
@amyblais Is it possible to make the video preview visible or invisible on the channel or the direct message itself, depending on your server settings?
A thumbnail of the video looks like this
However, depending on your server settings, you may see a list instead of thumbnails, as shown below.
I'll let @larkox take a look at these questions.
@bitdessert For technical reasons, in order to properly create the thumbnails, the video need to have a public url. That is why you are seeing those two different looks.
Regarding the issue, I am having trouble reproducing it. Maybe, as you said, the issue is regarding your server configuration? Are you able to reproduce it in our community server? (community.mattermost.com)
@larkox It's hard to tell which settings make such a difference. In the pure version, the default thumbnail resolves the filename, while in the customized version, only the thumbnail is visible. Can you give me a variable name or method to indicate which setting values are affected?
@bitdessert If you want to track down the code, the logic is in app/components/files/file.tsx
. There it decides whether to show it as a video attachment or a file attachment depending on:
After that it calls some native functions to create the thumbnail based on the video public url.
Regarding the public links enabled variables, it just check the config for EnablePublicLink
.
@larkox Thank you. I think this is because the pure server setup has a publicLinkEnabled value of false, and my customized server has a value of true. I think we can fix it so that the thumbnail is not visible regardless of whether it is a public link or not.
Per Mattermost guidelines, GitHub issues are for bug reports: http://www.mattermost.org/filing-issues/.
For troubleshooting see: http://forum.mattermost.org/. For feature proposals see: http://www.mattermost.org/feature-requests/
If you've found a bug--something appears unintentional--please follow these steps:
Summary
Bug report in one concise sentence
Environment Information
Steps to reproduce
Attach a video. Press Play or attempt to download the video.
Expected behavior
The video should download, play, or preview.
Observed behavior (that appears unintentional)
There seems to be a problem with the features listed above for MP4.
Possible fixes
Everything works fine on ios16 devices. My device is also an XR. However, there seems to be an issue with video in iOS17. The files I've seen are mp4 files, but there may be issues with other video files.