There is no way to tell Vimeo to use a secure HTTPS connection instead of an HTTP connection. On sites that are served over HTTPS, this generates an error.

Comments

mbutcher’s picture

StatusFileSize
new3.37 KB

This patch adds support for a variable that can be set to turn on HTTPS mode for videos.

One thing to note: media_vimeo makes use of ternaries frequently. I have not done so, as there is a known bug in PHP that causes memory consumption to grow tremendously when using a ternary for anything other than a scalar value. That said, I didn't go rewriting the existing code.

To turn on HTTPS globally, set the following variable: media_vimeo__secure = TRUE.

kreynen’s picture

Status: Active » Postponed (maintainer needs more info)

Can you test this with media_youtube? If you aren't getting errors in that module, I'll look at the recent changes and see how @aaron is addressing that. If media_youtube also generates errors, it's likely that all the player/provider modules have this issue and it would be great to see this addressed universally. Obviously I could add a setting page to configure this module with a variable that sets the use of http or https in the playback, but I'd have to update the other players/provider modules I maintain as well.

mbutcher’s picture

It is also an issue with YouTube. I've filed an issue and committed a similar patch. #1368818: HTTPS (SSL) support for YouTube player.

I think that the way I've addressed it should be amenable to a variety of methods of configuring it. As it stands, the patches I've submitted will allow you to set a system variable, or pass data into the theming functions (since that's where all of this work happens).

kreynen’s picture

Status: Postponed (maintainer needs more info) » Active

Maybe I'm missing something, but were is the secure variable set?

mbutcher’s picture

We set it with Drush or in settings.php.

I'm not sure Media handles setting these variables, and how we'd best provide a UI (if that's what you're asking). I suppose I could add an admin screen. I was sorta hoping there would be some discussion between the Vimeo and YouTube maintainers to decide how best to handle the configuration of these modules.

jelo’s picture

I think this feature is very important. I am considering to enforce SSL on my site, but right now emfield with the various provider modules leads to security warnings for users (depending on the browser more or less obstrusive).

Shouldn't the configuration just go into the main module config page at admin/content/emfield/emvideo? For each provider you can already specify some settings. It would be great to add a protocol section with the option to
- Always use embed from a https source if the provider supports it (like YouTube), even if the request comes from an unencrypted page itself
- Dynamically determine the protocol (if a Drupal site runs in mixed mode)

Cheers, J.

grasmash’s picture

@kreynen

Two ways that you can set the required variable.

Add this to your settings.php file:

$conf['media_vimeo__secure'] = TRUE;

OR

run this drush command:
drush vset media_vimeo__secure 1

drewish’s picture

Status: Active » Needs work

@mbutcher, I'd love to see some supporting links for your ternary claim. I can't find anything on google to that effect.

Why not just use protocol relative URLs? http://paulirish.com/2010/the-protocol-relative-url/

RobW’s picture

There are problems with caching viewing the embed outside of a web browser (e.g., in an email app) using relative URLs. See the discussion in #1368818: HTTPS (SSL) support for YouTube player..

Https support for Vimeo is still in beta, and apparently breaks if the player protocol doesn't match the page it's embedded in (http://vimeo.com/help/faq/embedding#https).

It seems the best choice for now is letting users decide. I'm writing a patch today that brings Media: Vimeo back into alignment with Media: Youtube after the changes made in #1555276: Clean up theming function, Use recommended iframe player by default, without js. The M:YT patch dealt with https; I'll include a http/https/relative option in the one for Media: Vimeo, with the warning that https is still in beta.

RobW’s picture

Looks like it's out of beta. Probably should update your FAQ before posting on Quora, Vimeo peeps.

http://www.quora.com/Vimeo/Vimeo-HTTPS-or-SSL-support-for-embedded-videos

RobW’s picture

Did some testing and it seems that despite the FAQ warning https videos play fine in http pages. Only tried in Webkit based browsers being served from my test server though, so I'm not sure if it's universal.

RobW’s picture

Patch mentioned in #9, including a formatter choice for http://, https://, or relative protocols, is ready for review: #1715438: Update code and bring it in line with the latest Media Youtube release. Fixes numerous issues.

RobW’s picture

Status: Needs work » Fixed

Protocol options have been added to the formatter in the latest dev. If anyone finds new information on protocols (e.g., we can use https iframes with http pages), please open a new issue.

RobW’s picture

The changes being discussed in #1768362: Add http/s/relative protocol options to fix protocol handling for js API and email/rss; choose https or relative as default will be ported to Media: Vimeo as soon as they're committed to Media: Youtube. Feedback welcome over there.

Status: Fixed » Closed (fixed)

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

alanburke’s picture

Status: Closed (fixed) » Active

Resolved over there
http://drupal.org/node/1768362#comment-6441240
Couldn't see a commit or another issue over here

grasmash’s picture

Looks like a change was committed to media_youtube, but I see no such commit in media_vimeo. A grep for the world 'protocol' turned up nothing in beta5, which was released in March.

grasmash’s picture

Status: Active » Closed (fixed)

Nvm, I'm confusing my chronology.

torrance123’s picture

There is definitely not https support in 7.x-1.0-beta5. Is this patch (or the one from media_youtube) planned to be rolled in 1.x?

andrewhine’s picture

Issue summary: View changes

Confirmed there is not https support in 7.x-1.0-beta5

codesmith’s picture

Status: Closed (fixed) » Active
devin carlson’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new3.13 KB

Support for HTTPS and protocol relative iframes is in the 7.x-2.x branch.

The attached patch enhances the existing protocol options, providing the same configuration settings as Media: YouTube.

devin carlson’s picture

Status: Needs review » Fixed

Tested #22 to ensure that both protocol relative and protocol specific options worked properly.

Committed #22 to Media: Vimeo 7.x-2.x.

  • Commit f169f1e on 7.x-2.x by Devin Carlson:
    Issue #1366706 by Devin Carlson: Standardized the protocol relative...

Status: Fixed » Closed (fixed)

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