When trying to view a video on an HTTPS page in Firefox, the following error is thrown:

Blocked loading mixed active content "http://www.youtube.com/embed/pedWSC9WXaA?rel=1&autoplay=0&wmode=opaque"

The problem here is that the video filter hardcodes the HTTP protocol into the iframe URL, and firefox rejects HTTP iframes from HTTPS pages. As such, this line of code:

$video['source'] = 'http://www.youtube.com/embed/' . $video['codec']['matches'][1] . '?' . implode('&', $attributes);

Needs to be changed to this:

$video['source'] = '//www.youtube.com/embed/' . $video['codec']['matches'][1] . '?' . implode('&', $attributes);

I will attach a patch for this to the next comment (I need an issue number).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jaypan’s picture

Priority: Normal » Critical
FileSize
615 bytes

Attaching a patch to fix this bug. Please note that by removing the protocol, the video works for both http and https.

ultimateboy’s picture

Status: Active » Closed (duplicate)

Closing as a duplicate of #786774 which has a patch which fixes this for every provider and not just youtube.