This might be an edge case scenario as I am using AmazonS3 to serve the audio file with private signed urls. This appends a querystring to the uri when file_create_url() is used. e.g.

media.s3.amazonaws.com/audio/audiofile.mp3?AWSAccessKeyId=XXXX&Expires=XXXX&Signature=XXXX

This module uses:

$audiofile = file_create_url($item['uri']);
$info = pathinfo($audiofile);
$op = $info['extension'];

which results in $op = mp3?AWSAccessKeyId=XXXX&Expires=XXXX&Signature=XXXX
Later in audiofield_get_player() we have

$variable_name = 'audiofield_audioplayer' . ($op == 'mp3' ? '' : "_$op");

which obviously cannot load the variable and therefor the player is not embedded.

Suggest using the original item['uri'] for pathinfo to get the file extension.

CommentFileSizeAuthor
#1 audiofield-file_querystring-2465879-1.patch947 bytestinker
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tinker’s picture

Status: Active » Needs review
FileSize
947 bytes
Anonymous’s picture

Status: Needs review » Patch (to be ported)

Tested, patch to be ported.

Anonymous’s picture

Status: Patch (to be ported) » Fixed
Anonymous’s picture

Status: Fixed » Patch (to be ported)
ws.agency’s picture

Patch review and tested.. to be ported.

ws.agency’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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