When you use a custom url, and link to a file stored locally, the embed code removes the site domain from the link, and just linkes to files/file.mov.

This breaks all content after clean url's is turned on.

<embed width="425" height="350" pluginspage="http://www.apple.com/quicktime/download/" scale="tofit" type="video/quicktime" controller="true" autoplay="true" src="files/my_movie.mov"/>
CommentFileSizeAuthor
#7 custom_url.patch451 bytesjerdavis

Comments

sorahn’s picture

I'm bumping this because it's still happening. And no one has even looked at this. I can try and write up a patch, but i'm having a hard time following where the code for the url generation for custom video embedding comes from.

aaron’s picture

Priority: Critical » Normal

we'll get to it when we get to it. definitely not critical, as custom url support has always been experimental.

aaron’s picture

if you want to try to write a patch, look in sites/all/modules/emfield/contrib/emvideo/providers/zzz_custom_url.inc to start with.

sorahn’s picture

Well, instead of just custom urls, what about just embedding your own videos? So maybe split custom videos into "local embedding and custom urls for off site"

Not sure, but the reason i thought it was critical is because it doesn't work with local ones, which i figured would work before third party ones.

I'll look through that file and see if i can figure out where the url is being passed into the embed code generator and why it's removing the domain if it's a local domain.

sorahn’s picture

Doing a little bit of expirementing...

If you embed a video from a site that isn't the one hosting drupal, it works fine.

            <div class="field-item odd">
                    <embed src="http://sorahn.net/misc/family_guy_skating.mp4" width="425" height="350" autoplay="true" controller="true" type="video/quicktime" scale="tofit" pluginspage="http://www.apple.com/quicktime/download/"> </embed>        </div>

However, if i host the same file locally. and do the embed, it cuts the domain and the drupal folder out of the url.

            <div class="field-item odd">
                    <embed src="files/family_guy_skating.mp4" width="425" height="350" autoplay="true" controller="true" type="video/quicktime" scale="tofit" pluginspage="http://www.apple.com/quicktime/download/"> </embed>        </div>

I looked through the whole zzz_whatever_file.inc and none of those functions actual do the URL parsing to decide what provider it should be.

It looked like emfield_parse_embed did the original parsing of the url, but i had a hard time finding where it would split the url and remove the domain because it's local.

And i do think this should be critical for local files, because as it stands there isn't another other CCK node to embed local videos.

aaron’s picture

Oh, heavens, don't use emfield for local video unless you're helping to experiment! There are currently a couple of other better solutions, among them notably FileField + jQuery Media (screencast at http://drupaltherapy.com/node/50). That's what I used at http://youdrup.com/ (as well as for some various client work).

jerdavis’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.x-dev
Category: bug » task
Status: Active » Needs review
StatusFileSize
new451 bytes

At least part of the issue here is the fact that there are no break; statements in the theme function's switch. This patch corrects that allowing the correct embed code to be used for the file types referenced.

aaron’s picture

Status: Needs review » Fixed

good catch, @jerdavis -- committed that. thanks!

the rest of this should have been fixed some time ago. please re-open if you still have this problem.

Status: Fixed » Closed (fixed)

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