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

FLV files hardcoded to display at 600x400

XMLWordPrintable

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

      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>'

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

              Created:
              Updated:
              Resolved:

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