Patch for "master" branch: https://reviews.mahara.org/6316
-- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1540654 Title: Proper handling of ".ogg" files Status in Mahara: Fix Committed Bug description: Son has found that Mahara doesn't currently handle ".ogg" files correctly. We have separate mappings for ".ogv" and ".oga" in the artefact_file_mime_types table, representing OGG video and OGG audio. But we don't have a mapping for ".ogg", which is a fairly common file extension on the internet, historically used by OGG video and OGG audio! So, this gets passed to finfo->file() or mime_content_type(), both of which identify a ".ogg" as "application/ogg", making it inaccessible to either the audio player block or the video player block! This puts us in a bind, because none of our available methods (file suffix, finfo, or mime_content_type) can determine whether these files are audio or video. The command-line Unix utility "mimetype" *can* distinguish them, but it's preferable not to bring more command-line utility execution into Mahara because it hurts portability. Fortunately, there's an easy way out. According to Wikipedia, the ".ogg" suffix was used for both OGG video & OGG audio prior to 2007. After that, the Xiph foundation changed their recommendation so that ".ogg" should be used only for audio files. (See https://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions for the up-to-date list). So, we should fix this issue as follows: 1. As an immediate fix, put a mapping in artefact_file_mime_types mapping ".ogg" to "ogg/audio". 2. As a longer-term fix, see if there are any all-PHP techniques (or maybe Javascript techniques we could use at the upgrade step?) to distinguish ogg/audio and ogg/video files based on their file content. (i.e., has anyone ported the "mimetype" utility to PHP?) To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1540654/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

