When using i18n, the language code is prepended to the default player's path, thus creating a non valid path. Below is an example when using english with i18n:

if (Drupal.jsEnabled) {
  $(document).ready(function() {
    $.fn.media.defaults.flvPlayer = '/en/mediaplayer.swf';
    $.fn.media.defaults.mp3Player = '/en/sites/all/themes/indymedia/players/1pixelout.swf';
    $.fn.media.defaults.autoplay = 1;
    $.fn.media.defaults.bgColor = '#ff0000';
    $('a.media').media( { width: 500 } );
  });  
}
</script>

Comments

brunodbo’s picture

This is the path I entered in the 'Default player settings' at /admin/settings/jq:

sites/all/themes/indymedia/players/1pixelout.swf

Boletus’s picture

I have the same problem with version 6. Did any good solution show up?

Boletus’s picture

I added a full URL to the player instead of a relative one, i.e. http://www.mydomain.com/sites/all/modules/jquery_media/player.swf
That made it work.

seaneffel’s picture

Boletus, which file were you editing?

Boletus’s picture

No file, just the default player setting.

waddles’s picture

Status: Active » Closed (works as designed)

Using the full URL didn't work for me, but I spent a few hours nutting out some lua to chop the language prefix off. This is part of some version of the drupal.lua script mentioned at http://nordisch.org/lighttpd

-- if the file exists, it will be served by lightty
-- otherwise, let's see if we can find it ...
if (not file_exists(lighty.env["physical.path"])) then

    -- check for file without language prefix (Eg. /es/path/to/file)
    local nolang_path = string.sub(lighty.env["physical.rel-path"], 4)
    if nolang_path ~= "" and file_exists(lighty.env["physical.doc-root"] .. nolang_path) then
      -- request the correct path next time
      lighty.header["Location"] = nolang_path
      return 302
    end

    -- file still missing. pass it to the fastcgi backend
mattez’s picture

Status: Closed (works as designed) » Active

Same issue in D6 & better description:
#373610: flvPlayer path and i18n bug

St0iK’s picture

@Boletus
That worked for me too,

Thanx a lot