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

[C2] Allow multi-format media files #5600

Closed
ywarnier opened this issue Jun 20, 2024 · 0 comments · Fixed by #5625
Closed

[C2] Allow multi-format media files #5600

ywarnier opened this issue Jun 20, 2024 · 0 comments · Fixed by #5625

Comments

@ywarnier
Copy link
Member

The idea behind files management in C2 is to allow for some resources to have multiple file formats.
But this seems to have been implemented slightly wrong: the resource_file table should have a resource_node_id field, and not the other way around (resource_node having a resource_file_id).

Changing this (in entities and migrations - migrations will be slightly tricky to do) will allow us to have one single resource and define files in different mime types and dimensions.

The ResourceController should then receive requests for nodes, find the available corresponding files, and decide which one is best.

2 obvious use cases for now are:

  • providing videos and audios in a format compatible with the browser
  • providing lower-resolution videos for users with lower bandwidth

For now, we just need fixing the database structure and changing the ResourceController to have the basics to later improve support for different formats. Later on (in another issue) we will implement files conversions (through php-imagick and php-ffmpeg if available) and best-format decisions based on browser capabilities.

@ywarnier ywarnier added this to the 2.0 milestone Jun 20, 2024
AngelFQC added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 2, 2024
@AngelFQC AngelFQC linked a pull request Jul 2, 2024 that will close this issue
AngelFQC added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 2, 2024
AngelFQC added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 2, 2024
AngelFQC added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 2, 2024
AngelFQC added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 3, 2024
ywarnier added a commit to AngelFQC/chamilo-lms that referenced this issue Jul 4, 2024
ywarnier pushed a commit that referenced this issue Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants