I have a use case where I want to upload the file to another site, not my Drupal instance, and provide the media file location as a URL to the MediaElement player.

CommentFileSizeAuthor
#1 Link-Module-Support-1248572-1.patch731 bytesdale42

Comments

dale42’s picture

Status: Active » Needs review
StatusFileSize
new731 bytes

The following patch adds support for the Link module so a Link URL field can use the Media Element field formatter.

I'm happy to make any changes you need to get the patch in, just let me know. (I don't always get email notifications when issues are updated, so please don't interpret my lack of response as a lack of interest! I will try to check back regularly.)

avibrazil@gmail.com’s picture

I can confirm this patch works for me.

BTW, the MediaElement module README file says you can create a Link field and use MediaElement as the display formatter. This was wrong (and very confusing) before this patch.

scottrigby’s picture

Status: Needs review » Reviewed & tested by the community

simple and works.

lyricnz’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

This is resolved in a slightly different way in #1388214: Undefined index: uri in mediaelement_field_formatter_view() (line 122 of sites/all/modules/mediaelement/mediaelement.module). Using file_create_url() on the URL from a Link field allows the URI to be altered, e.g. to serve a file from a CDN or static file server. Marking as duplicate...

See http://api.drupal.org/api/drupal/includes--file.inc/function/file_create...

scottrigby’s picture

@lyricnz - good point… bypassing file_create_url() is not the best idea.