apps-android-commons
apps-android-commons copied to clipboard
[Bug]: Displaying a non-image file in full screen doesn't work
Summary
When trying to display a video in full screen, it doesn't work and the screen stays black. It's not because it's loading, because the loader "thing" disappeared, and the status bar at the bottom has been completed too. So I'm pretty sure the video was loaded but the app fails to display it. So it's impossible to view videos with the app, because the only thing we cans see is a thumbnail on the file page.
Steps to reproduce
- Have the app open
- Search for a video in the explore tab (I picked this one but it works for other ones too; I think it applies to all videos)
- Click on the wanted file (You arrive on the file page, with the description, title, licence, coordinates, etc.)
- Click once again on the video
Expected behaviour
The video should be displayed, as it does well for images.
Actual behaviour
The screen stays black.
Device name
Samsung Galaxy A40
Android version
Android 11
Commons app version
4.2.1~14b6c455b
Device logs
No response
Screen-shots
| Working for an image | Not working for a video |
|---|---|
| - | - |
Would you like to work on the issue?
Prefer not
I would like to work on this issue 😄
@AmanNegi It is yours, thanks! 🙂
@AmanNegi it seems to be the same for sound files
Okay @PetitPotiron I will look into this.
@AmanNegi Any progress to share? 🙂
Well, I had some issues setting up the project and then with the Beta Account creation. Currently, I'm busy with a few tasks at hand, if this is a high priority task feel free to assign it to someone interested!
@AmanNegi Not really high priority, don't worry. :-) Also, you can use the prodDebug flavor https://github.com/commons-app/commons-app-documentation/blob/master/android/build-variants/Build-Variants.md to find the file mentioned by PetitPotiron.
@nicolas-raoul I looked into this issue and here are the few things I found.
- We are using
frescoto display and cache images in theZoomableActivity.kt. - After my research I came to the conclusion that
frescois used to show images only. However, in WikiMedia we support several kinds of files just to name a few(pdf/ gif/ png/ jpg etc). Trying to load all these file types usingfrescocan cause issue while rendering the file usingfresco, which leads to the blank screen.
Alternate Solution
Instead of showing the blank screen we should present the user with at least the thumbnail. User can further download any kind of media and view on their device.
Please correct me if I am wrong here, and let me know if I should build upon this alternative solution.
Interesting, thanks! When Fresco isn:t able to load a file, how about just opening the file with Android's default app for that file type? For instance for a video it could be VLC, etc. Just launching an open intent should be enough.
Thanks for the amazing suggestion! Redirecting the user to the correct app would make it a seamless user experience.
Implementing this right away. 👍
@nicolas-raoul The server is currently unable to serve any assets. Are the servers under maintenance? Or am I missing something. Also are there any communication channels like Discord, where I could connect with the community.
Error
Our servers are currently under maintenance or experiencing a technical problem.
Please Reload this page try again in a few minutes.
See the error message at the bottom of this page for more information.If you report this error to the Wikimedia System Administrators, please include the details below.
Request from 112.196.33.226 via deployment-cache-upload08.deployment-prep.eqiad1.wikimedia.cloud, ATS/9.1.4
Error: 500, Cannot find server. at 2024-02-13 03:31:25 GM
@AmanNegi I just tried, upload is working. It might have been a temporary issue, please try again, thanks :-)
@nicolas-raoul This still doesn't seem to work. (talking about the images not being loaded into the app)
https://github.com/commons-app/apps-android-commons/assets/37607224/f65aff4c-2d6c-4bba-bb18-55a1109bfc7d
@AmanNegi Is it working better now?
@AmanNegi I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-)