Coming from http://drupal.org/node/1506674#comment-7139832, I noticed that output wrapper markup differs from the media_youtube-2.x-dev

@arthur indicated that

By default media now adds these classes to files inserted that have these classes: media, media-element-container, and media-$view_mode.

Here is the output from a media_vimeo-2.x-dev insert:

<div class="media-vimeo-video media-vimeo-1">
  <div class="fluid-width-video-wrapper" style="padding-top: 56.25%;"><iframe class="media-vimeo-player" src="http://player.vimeo.com/video/22439234?color=" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" id="fitvid787471"></iframe></div>
</div>

Here is the output from a media_youtube-2.x-dev insert:
Note: notice the file-4-x-3-video, that is the view mode

<div class="media-youtube-video media-element file-4-x-3-video media-youtube-1">
  <div class="fluid-width-video-wrapper" style="padding-top: 75%;"><iframe class="media-youtube-player" title="Cat Man Do - Simon's Cat" src="//www.youtube-nocookie.com/embed/w0ffwDYo00Q?wmode=opaque&amp;modestbranding=1&amp;rel=0" frameborder="0" allowfullscreen="" id="fitvid618069">Video of Cat Man Do - Simon&amp;amp;#039;s Cat</iframe></div>
</div>

So it looks like we are missing the classes "media-element and file-$view_mode

Comments

gmclelland’s picture

I found the problem, patch is coming.

gmclelland’s picture

Status: Active » Needs review
StatusFileSize
new2.54 KB

Here you go.

gmclelland’s picture

Patch still applies and works against 2.0-rc1

David_Rothstein’s picture

Category: support » task

Confirmed this patch works (results in the correct classes being added, and matches what Media YouTube does).

This part seemed unrelated, though:

-  $variables['video_id'] = $parts['v'];
+  $variables['video_id'] = check_plain($parts['v']);
+
+  // Make the file object available.
+  $file_object = file_uri_to_object($variables['uri']);

Especially the $file_object part, which is never even used... (But it's also harmless to have it in there.)

Other than that, I think this is RTBC.

devin carlson’s picture

Issue summary: View changes
Status: Needs review » Fixed

This was fixed as part of a general cleanup of the formatters.

Status: Fixed » Closed (fixed)

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