Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video playback #5983

Open
OpenGreenStreet opened this issue Dec 1, 2024 · 6 comments
Open

Video playback #5983

OpenGreenStreet opened this issue Dec 1, 2024 · 6 comments
Assignees

Comments

@OpenGreenStreet
Copy link

What is the user problem or growth opportunity you want to see solved?

Video playback was requested several times as a basic function.

How do you know that this problem exists today? Why is this important?

Uploaded videos cannot be played from the app.

Who will benefit from it?

all users

Anything else you would like to add?

No response

@nicolas-raoul nicolas-raoul changed the title Video playback (only if not already similarly requested) Video playback Dec 2, 2024
@parneet-guraya
Copy link
Contributor

This is interesting. I'd like to work on this if possible. Could you tell me what are the requirements?

@nicolas-raoul
Copy link
Member

Requirements:

  • Ideally see what the Wikipedia app is doing, and do the same.
  • Use only open source. To see an example, install the Wikipedia app and open the English "Running" article.
  • Keep APK size small, for instance by using Android's readily available components rather than importing new third-party libraries.
  • Play most video formats found on Commons. @OpenGreenStreet would you mind listing an example video for each format?
  • Play the miniature version of the file, rather than downloading the original which can be huge. See how the Wikipedia app does.
  • Not make files lists heavier (for instance Contributions or Explore lists). It is OK if the video is only playable in Media Details.
  • Other than that, you can make your own implementation choices. Do not hesitate to ask. 🙂

@OpenGreenStreet Anything important I missed?

@OpenGreenStreet
Copy link
Author

OpenGreenStreet commented Dec 16, 2024

@nicolas-raoul

I wrote to https://commons.wikimedia.org/wiki/User:Prototyperspective and asked them to reply instead of me.

I basically just posted his suggestion here.

@prototyperspective
Copy link

Thanks for filing this issue and also for pinging me. It's a duplicate of an issue I filed earlier but as long as it gets some momentum behind this issue that's great anyway: #5622 (maybe that issue's title or description was not as good or one could make that linked issue about the other nonsupported filetypes like STL files).

@parneet-guraya it would be amazing if you could look into it; I think one would need to integrate some open source video player which may not take very long and maybe one could use / copy whatever is used in the Wikipedia app which can play videos (by the way I just noticed it can't make the video fullscreen but otherwise that player seems good and has a jump 10 seconds forward/backward feature).

@nicolas-raoul

  • This page lists the video formats and one can click on the MIME type column wikilink to see examples
  • When playing a video on Commons it also doesn't play the highest resolution version by default; I think the resolution should be configurable in the player / app settings so one can also play videos at low resolution when not in wlan; I think without doing anything it would play that default version and also it streams the file instead of "downloading" it
  • Some requirements may not be listed but somewhat self-explanatory; e.g. it shouldn't load very long, have a button to turn the video to fullscreen (maybe even a rotate & fullscreen button), have the skip x seconds forward & backward feature when tapping twice on either side of the video, have a seek feature so you can jump around the video which I think all video players have, and show a thumbnail (ideally the same as on WMC which currently still can't be configured)

@OpenGreenStreet
Copy link
Author

@prototyperspective
Thank you for your feedback.
I had already thought about integrating an open source video player. Would VLC perhaps be an option?

@parneet-guraya
Copy link
Contributor

Thankyou @nicolas-raoul & @prototyperspective for specifying the requirements, I will pick this issue up shortly.

As far as player is concerned we have an official library from google Jetpack Media3. It supports both audio,video & images (never used it for that but can be useful for gif ) . I already have worked with it in the past a little example (migration), you can see how interface would look like. It has all the basic functionality one can expect from a player; play/pause , slide to seek/seek fw/bw & we can have full screen enter/exit as well.

Lastly, loading time or stream quality would depend on if API provide us with adaptive streaming type.

Thanks again :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants