Reading through #1042442: Editing Video thumbnail and Large Video Size. , support for existing Image Styles to generate thumbnails for YouTube videos has been implemented. Any plans to provide a configuration option to set the size of the video/player through the Field Styles settings?

CommentFileSizeAuthor
#6 media_define_width_height.jpg99.81 KBzambrey

Comments

rggoode’s picture

Subscribe

jmones’s picture

subscribe

zambrey’s picture

Actually when you have latest media module installed you can define width/height of the video player under
/admin/config/media/file-types/manage/video/file-display

This can be done without using Styles module.
Just remember to enable File Entity module (from media package).

Additionally you can even select existing image styles for youtube preview image.
However I didn't manage to setup the last one properly. Still learning...

minneapolisdan’s picture

Thanks for this, I couldn't find where to go to edit the size of my YouTube previews.

liquidcms’s picture

@zambrey.. and hints on how to do this?

i found the admin page you mentioned (would never have found it with out that).. and i see nothing anywhere for setting sizes..

i get this: http://screencast.com/t/InG6Vbn4TS

zambrey’s picture

StatusFileSize
new99.81 KB

@liquidcms sure, I can help :)
You are almost there, you should enable Youtube Video display and configure width and height at the bottom.
Make sure that YouTube Video is at the top of enabled view modes.
You can see it at following screenshot. Hope it helps.

liquidcms’s picture

ok, yes, i have that now.. i needed to check the "YouTube video" option. thanks.

still lost in how these tie together though.. i had created a new "youtube" file "style" to get my second player (different size than where Youtube video is used) and selcting that on the page you told me does not give me dimension options..

i'll play around with it a bit; my guess is i, like many, am confused about file style, file type, etc.. and really am missing the place where i can add another of whatever it is that "YouTube video" is.

liquidcms’s picture

ok, i can see that the tabs at the top here (no idea what they refer to or how they get added) allow me to set different dimensions: http://screencast.com/t/53GGlW37V

but when i go to edit my View none of these have anything to do with the Formatter options i get for my video field.

i get that D7 is all about making the UI as complex as possible.. but seriosuly.. lol

is there really no documentation on how file types, media, file styles, views formatters, etc, etc tie together?

zambrey’s picture

Yeah, it is very confusing and lacking documentation but I've managed to configure this for my purposes.
I guess views media formatter refers to the tabs that you marked in the screenshot.

skolesnyk’s picture

Version: 7.x-1.0-alpha5 » 6.x-1.3

I don't see this option in D6 version of the module. Is there a way to set video dimensions?
Sorry, found it in the CCK field settings.

RobW’s picture

Category: feature » support
Status: Active » Closed (fixed)

This problem looks solved. Marking as closed.

areynolds’s picture

Version: 6.x-1.3 » 7.x-2.x-dev

Note that I believe this is now obsolete information, as styles have been removed from Media: Youtube. See http://drupal.org/node/1658102

To configure the size of video players, you should now investigate admin/structure/file-types/manage, select your media type, and then choose the "Manage file display" tab.

willvincent’s picture

Status: Closed (fixed) » Active

Sorry to reopen, but I don't believe this is resolved.

The config options for file field display appear to allow configuration of a single height/width, but how does one control the height/width on individual fields?

For example, I have a site with a video gallery that shows the videos at the configured default, but there are a few other places within the site that require a video to appear on the page at a different (smaller) size.

willvincent’s picture

Specifically the issue I'm looking at is when a youtube video is added within the body field and needs to be a different size than what the default config for the player is.

I found that disabling the wysiwyg (after adding the video), and adding height and width params does the trick...

So, for example, instead of this:

[[{"type":"media","view_mode":"media_large","fid":"214","attributes":{"alt":"My Demo Video","class":"media-image"}}]]

I have this:

[[{"type":"media","view_mode":"media_large","fid":"214","attributes":{"alt":"My Demo Video","class":"media-image","height":"273","width":"450"}}]]

Whereas elsewhere on the site the player by default will be 560x340.

This works, but it's not ideal having to disable wysiwyg and manually edit the embed code.. perhaps this is an issue for media module though? Or perhaps it's already handled if you change the dimensions through the wysiwyg image control -- I don't have image enabled though, so as to prevent images being added unless they're done with media module.

RobW’s picture

The way to achieve this is with multiple view modes each with different formatter settings. Now that choosing view mode on embed is re-enabled (see one of the recently closed issues) you could for example make an Editor-Large and Editor-Small view mode, define the formatter options you like for each, and then choose which you'd like to use wen embedding.

Make sense?

willvincent’s picture

It does.. but how do you create the different view modes? Would it be basically the same process as creating a new view mode for a node or other entity? Custom module defining the additional view mode(s)?

RobW’s picture

Yep. I suggest the Entity View Mode module.

RobW’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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