Hi,

Using 7.x-1.10 when I provide a flv file but no mp4 file no file is used by the flash player.

Mime type of my flv file is video/flv and it's the only file I use (for the example).

In template_preprocess_videojs() a list of codecs is defined ($codecs var) but 'video/flv' is not declared in that list. Consequence is that the file with that mime type is skipped in "Skip unplayable items" section (line 38) and therefore not added to either $items_mp4 nor $items_other. This way the flv file will never be in $vars['items'] (line 72) and will never be found in the loop of line 74 :

  foreach ($vars['items'] as $item) {
    if ($item['filemime'] == 'video/flv') {
      $vars['flash'] = file_create_url($item['uri']);
      break;
    }
  }

Code will then always fallback to line 80 and try to use the mp4 here.

  if (!isset($vars['flash'])) {
    $vars['flash'] = file_create_url($items_mp4[0]['uri']);
  }

(this will also raise a notice if there are no mp4 file)

Not sure of the best way to fix this anyway.

Regards,

Seb

Comments

Jorrit’s picture

Status: Active » Fixed

You're right, I've fixed this in 7.x-1.x and 6.x-1.x, thanks. The notice has been fixed as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.