Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26697 mediaplugin fixes and improvements META
  3. MDL-13078

Allow larger sizes for multimedia filters (flv, swf, etc.)

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0.3
    • Component/s: Filters
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Right now if you use the syntax documented on this page: http://docs.moodle.org/en/Multimedia_plugins
      for controlling the size of the player for flv or swf or other media players, like so:

      somepath.swf?d=640x480

      It will not work if you use a larger size like this:

      somepath.swf?d=1024x768

      because the PHP code only accepts up to 3 digits.

      I am using bigger video files to show screencasts, where you need a bigger size and resolution so the video is more readable.

      To fix this, in moodle/filter/mediaplugin/filter.php, there are lines that start like this:

      $search = '/<a.*?href="([^<]+\.flv)(?d=([\d]

      {1,3}%?)x([\d]{1,3}

      %?))?" and so on

      Change each instance of this:

      [\d]

      {1,3}

      to this:

      [\d]

      {1,4}

      or just use a + for repeated digits of any length.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            dugh Doug Holton
            Participants:
            Component watchers:
            Jake Dallimore, Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/May/11