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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Link-Module-Support-1248572-1.patch | 731 bytes | dale42 |
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Link-Module-Support-1248572-1.patch | 731 bytes | dale42 |
Comments
Comment #1
dale42The 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.)
Comment #2
avibrazil@gmail.com commentedI 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.
Comment #3
scottrigbysimple and works.
Comment #4
lyricnz commentedThis 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...
Comment #5
scottrigby@lyricnz - good point… bypassing file_create_url() is not the best idea.