Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19927

filelib.php enhancment to support ogv (theora) mime type [PATCH]

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.5
    • Fix Version/s: 1.9.10, 2.0
    • Component/s: Filters, Libraries
    • Labels:
      None
    • Environment:
      Linux Server, Apache 2.2, PHP 5.2, Postgres DB
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Currently, any Ogg/Theora video that is uploaded to Moodle has an unset mime type when downloaded. A simple one-line patch sets the correct mime type on the Ogg/Theora video (files that end in .ogv). This allows those videos to automatically play when viewed by a browser like Firefox 3.5+ that supports Open Video. Furthermore, without this correct mime type, Open Video isn't even possible for those (like me) that are willing to hand code the HTML in, for instance, a web page resource to use the <video> tag and .ogv videos.

      After applying the above patch, custom HTML inserted into a new resource -> web page, like:

      <video height="480" width="640" tabindex="0" poster="/file.php/1351/MyVideo.jpg" controls="true">
      <source src="/file.php/1351/MyVideo.ogv" type="video/ogg" />
      <source src="/file.php/1351/MyVideo.mp4" type="video/mp4" />
      </video>

      Works just fine in Firefox 3.5+, without the patch, Firefox fails to view the video in its built in player.

        Attachments

        1. MDL-19927_v19.patch
          0.7 kB
        2. MDL-19927_v20.patch
          0.7 kB
        3. ogv.patch
          0.8 kB

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              paul.ortman Paul Ortman
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Oct/10