I have been placed in charge of updating a Drupal installation that was woefully out of date. The previous version of EMField was 6.x-1.0-beta1, so I updated to the latest version, 1.18. After the update, embedded custom URL WMV files appear as a flash player that says "Click to play" but does nothing when clicked. I looked at the embed for the player and found that it pointed to a player on http://freevideocoding.com so I searched the custom URL provider file for this URL. This URL appears only in the case that references FLVs in theme_emvideo_zzz_custom_url_embedded_video in zzz_custom_url.inc. It appears that, for some reason, these WMV files are being wrongfully detected as FLVs and passed to the wrong section of the embedding function. Does anyone have any ideas on why this might be occurring? I updated sequentially to each version after I uninstalled 1.18, and found that the issue occurs after the upgrade to 1.12, which has "Add FLV Media Player support to custom url videos" listed as an enhancement.

Comments

Herbie’s picture

Version: 6.x-1.12 » 6.x-1.19

I experienced the same problem. It is caused by a bug in zzz_custom_url.inc:

...
      switch ($type) {
        case 'wmv':
        case 'wma':
          $autostart = $autoplay ? '1' : '0';
          $output = '<embed src="'. $url .'" width="'. $width .'" height="'. $height .'" autostart="'. $autostart .'" showcontrols="1" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"> </embed>';
        case 'mov':
        case 'mp4':
        case 'm4v':
          $autostart = $autoplay ? 'true' : 'false';
          $output = '<embed src="'. $url .'" width="'. $width .'" height="'. $height .'" autoplay="'. $autostart .'" controller="true" type="video/quicktime" scale="tofit" pluginspage="http://www.apple.com/quicktime/download/"> </embed>';
        case 'rm':
          $autostart = $autoplay ? 'true' : 'false';
          $output = '<embed type="audio/x-pn-realaudio-plugin" src="'. $url .'" width="'. $width .'" height="'. $height .'" autostart="'. $autostart .'" controls="imagewindow" nojava="true" console="c1183760810807" pluginspage="http://www.real.com/"></embed><br /><embed type="audio/x-pn-realaudio-plugin" src="'. $url .'" width="'. $width .'" height="26" autostart="'. $autostart .'" nojava="true" controls="ControlPanel" console="c1183760810807"> </embed>';
        case 'swf':
          $output = '<embed src="'. $url .'" width="'. $width .'" height="'. $height .'" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
        case 'flv':
          $autostart = $autoplay ? 'true' : 'false';
          $output = '<embed src="http://freevideocoding.com/flvplayer.swf?file='. $url .'&amp;autoStart='. $autostart .'" width="'. $width .'" height="'. $height .'" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
      }
...

The break statements are missing, so all files are embedded as flv.

aaron.r.carlton’s picture

i think i am experiencing problems related to this issue also. anyone else? have the maintainers had a chance to look? what about a patch? if all that is needed is the break statements, i can submit a patch, but i think the maintainer or someone more familiar with the code should weigh in...

masondib’s picture

I was having the same problem, but with rm files being incorrectly embedded as flv. Adding the break statements fixed it for me.

I'm a relative newbie and don't know how to submit a patch, but I just wanted to agree with Herbie that this does seem to be the correct fix.

aaron.r.carlton’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB

Here is a patch against the latest development version. Let me know if it doesn't work - I'm still relatively new at submitting patches on d.o :)

aaron’s picture

Version: 6.x-1.19 » 6.x-1.x-dev
Status: Needs review » Fixed

this has been fixed for some time. thanks!

Status: Fixed » Closed (fixed)

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