Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | video_embed_field-invalid_urls_in_iframes-1985290-5.patch | 2.42 KB | Bao Truong |
#3 | video_embed_field-invalid_urls_in_iframes-1985290-3.patch | 2.42 KB | svajlenka |
#2 | iframe src missing http.png | 36.32 KB | texas-bronius |
Comments
Comment #1
texas-bronius CreditAttribution: texas-bronius commentedI'm referring to line #2 in froogaloop2.js:
From https://github.com/vimeo/player-api/blob/master/javascript/froogaloop.js...
Comment #2
texas-bronius CreditAttribution: texas-bronius commentedVisual aid attached.
Comment #3
svajlenka CreditAttribution: svajlenka commentedHere's a patch to fix this.
Comment #4
bachbach CreditAttribution: bachbach commentedthnaks 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
Comment #5
Bao Truong CreditAttribution: Bao Truong commentedI 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