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

FLV files hardcoded to display at 600x400

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • 1.9.8
    • Resource
    • MOODLE_19_STABLE

    Description

      FLV files are currently hardcoded to display at width = 600 height = 400. When a video is linked to via the Add a Resource - Link to a file or web page, it can display out of proportion; stretched or skewed. Would be nice if moodle was setup to determine the height and width using ffmpeg for local files or by allowing the user to enter via the UI.

      Code from resource/type/file/resource.class.php

      else if ($resourcetype == "flv") {
      $id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache
      $cleanurl = addslashes_js($fullurl);

      // If we have Javascript, use UFO to embed the FLV player, otherwise depend on plugins

      echo '<div class="resourcecontent resourceflv">';

      echo '<span class="mediaplugin mediaplugin_flv" id="'.$id.'"></span>'.
      '<script type="text/javascript">'."\n".
      '//<![CDATA['."\n".
      'var FO =

      { movie:"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file='.$cleanurl.'",'."\n". 'width:"600", height:"400", majorversion:"6", build:"40", allowscriptaccess:"never", allowfullscreen:"true", quality: "high" }

      ;'."\n".
      'UFO.create(FO, "'.$id.'");'."\n".
      '//]]>'."\n".
      '</script>'."\n";

      echo '<noscript>';

      echo "<object type=\"video/x-flv\" data=\"$fullurl\" width=\"600\" height=\"400\">";
      echo "<param name=\"src\" value=\"$fullurl\" />";
      echo '<param name="quality" value="high" />';
      echo '<param name="autoplay" value="true" />';
      echo '<param name="autostart" value="true" />';
      echo '</object>';
      echo '<p><a href="' . $fullurl . '">' . $fullurl . '</a></p>';

      echo '</noscript>'

      Attachments

        Activity

          People

            skodak Petr Skoda (Inactive)
            lholden Lori Davies
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.