Hi - My videos using fields on a node work great - but viewing html source, I see that the iframe src attribute lacks protocol (missing http:, only has //). I believe this is causing a conflict for me for work with Vimeo API (its froogaloop2 library is looking to define "src" for callbacks, but src only works when it has the full http:// bit).

Is this this a module or site config consideration?

Thanks again for the great, simple, easy module!

-Bronius

Comments

texas-bronius’s picture

I'm referring to line #2 in froogaloop2.js:
From https://github.com/vimeo/player-api/blob/master/javascript/froogaloop.js...

  playerDomain = getDomainFromUrl(this.element.getAttribute('src'));
texas-bronius’s picture

StatusFileSize
new36.32 KB

Visual aid attached.

svajlenka’s picture

Status:Active» Needs review
StatusFileSize
new2.42 KB

Here's a patch to fix this.

bachbach’s picture

thnaks for the patch, works for me.
Without it i wasn't able to controle the vimeo iframe according to this page : http://jsfiddle.net/bdougherty/UTt2K/ because url was incorrect

Bao Truong’s picture

I found a type-o in the video_embed_field-invalid_urls_in_iframes-1985290-3.patch at line 30 for the youtube iframe code:

$output['#markup'] = '<iframe width="' . $settings['width'] . '" height="' . $settings['height'] . '" src="http:' . $s . '//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';

should be

$output['#markup'] = '<iframe width="' . $settings['width'] . '" height="' . $settings['height'] . '" src="http' . $s . '://www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';

Looks like the $s variable was inserted after the colon in the http string instead of before. The new patch video_embed_field-invalid_urls_in_iframes-1985290-5.patch has this fix