So far I've found out that I need to add a "file" field to my content type (not very intuitive, but see #1414602: Add a new field type for "Embeded media" for more on that.) and then choose the "Embedded media field" widget.

I still can not figure out how to display the video as embedded media. My display options are: Generic File, Table of files, URL to file, Rendered file, Large filetype icon. My guess was rendered file, but that seems to do the same thing as generic file.

It would be helpful to include some documentation on how to use Emfield if it's going to be this non-intuitive. I'm happy to help create some of this documentation if someone can guide me through the set-up process.

Comments

KoCo’s picture

Priority: Normal » Minor

Choose "Rendered File" and select the sub-display or view-mode.

You need to configure the display options for every view-mode in the "Media file settings - manage display". => admin/config/media/file-types/manage/video/file-display

A lot of the info you're looking for will be depending on the Core Media module, and what it has to offer.
Still a bit early, I guess, for a full documentation for "embedded media field in D7".

shanethehat’s picture

I don't have a 'rendered file' option in the list. My options are:

  • Generic file
  • Table of files
  • URL to file
  • Large filetype icon
  • Hidden

What can I do to enable 'rendered file', because none of these options work for me?

marazmus’s picture

I don't have a 'rendered file' option in the list

Same issue. Please help :)

seaneffel’s picture

Category: support » task
Priority: Minor » Normal

Ditto. I've been using Emfield on a dozen or more D6 sites, I created the first screencast of Emfield a few years ago, and I'll be damned if I can't get it working on D7.

And it's never too early to invest time in documentation. Better docs = higher adoption = more contributions = better module.

MetsArt’s picture

I used it with Media and Media: YouTube (for example) and it worked just fine. I could use the video itself, the url or even the iframe code.

In Administration » Configuration » Media » File types on the Manage Display page I get:

  • Generic file
  • Table of files
  • URL to file
  • Large filetype icon
  • Image
  • YouTube Video
  • YouTube Preview Image
Yoran Scholiers’s picture

Doesn't work here. No option called 'rendered file'.
Only options that I choose from are the same as #2

Lots of notices though on the manage/image/file-display page.
"Notice: Undefined index: label in file_entity_file_display_form() (line 76 of media/file_entity/file_entity.admin.inc)."

This results in the bottom 2 Enabled displays options to have no label.

EDIT:
Could it be a conflict with the media module?

davidcsonka’s picture

thehat, and Varengas -

Do you have any of the provider modules installed?

Such as media_youtube or media_vimeo ?

Yoran Scholiers’s picture

Ah,...
I use this module for pulling images from a cvs feed.
Is there a provider module for images?

davidcsonka’s picture

I'm not very familiar with Embedded Media Field module, but if all you need to do is allow a user to post a URL for YouTube or Vimeo videos and have them become embedded within a node, then you should check out the module http://drupal.org/project/video_embed_field

However, if you need to be able to source or store actual media files, then you probably need to figure out the issues with emfield and media modules here.

seaneffel’s picture

Title: Create documentation on how to use Emfield for D7 » Create documentation on using D7 Embedded Media Field

Let's also be explicit in our use of names since we have so many similarly named modules swimming in the pool. The original post asked for documentation on the use of Embedded Media Field for D7.

I've experienced the issue jenlampton reported, too. It seems difficult to determine where the Media module's work ends and the Embedded Media Field begins. In the case of creating new fields, I have had success creating new media fields that can store both files and embedded URLs from video providers. In the case of migrating old Embedded Media Fields from D6, those fields were file fields and there has been little success on my end getting those migrated file fields to display embedded URLs.

A file field set up as an embedded media field does not offer display types consistent with the way a new media field behaves.

It would be excellent if the module developers could get out some documentation on the proper way to implement the Embedded Media Field module, such as the recommended field types and configuration settings. I looked at the issue queue and it seems like a lot of users and site developers are trying to navigate this right now and don't have any docs to guide them.

davidcsonka’s picture

MetsArt,

Can you provide any further info on what configuration options you used, and how you set up the field in a content type, in order to make it work?

MetsArt’s picture

Hi, sorry for the delay.
I'm running D7 with Media, Media: YouTube and Embedded Media and any of the required modules for them. (too late to look at all of them right now!)

I set up the files types for Media on the Config page. In "Manage Fields" for Video, I added a field for embedded media and selected "Multimedia Asset" in the Field dropdown list and "Media File Selector" for the Widget.

When that was done, I was able to add a field (to Basic Page for instance) for the embedded URL and select that file type. Does that make sense? It's a bit late and I'm punchy.

I will try to fill in more details later. I gotta get up early and get to FLDrupalCamp tomorrow!

davidcsonka’s picture

Yes, I think that matches some instructions here:
http://cleverlogic.net/tutorials/drupal-7-video-setup-using-media-and-me...

davidcsonka’s picture

One of the problems with this route however, is that apparently the Multimedia Asset type is being deprecated in favor of using the built in File field for Drupal Core. The downside is, none of that code seems to be mature for Drupal 7.

seaneffel’s picture

Oooh, I like that the stuff in core gets used. It means the module has less to maintain.

Like I said above in #10, I have not been able to store or display embedded links in file field no matter how hard I try. So what you are saying about that code not being fully baked makes a lot of sense now. And documentation will be held up by that lack of stability... bummer.

IT-Cru’s picture

Hello together,

I also have yesterday the problem with the display of the embedded media file field. I get only the link showed, but no embedded video displayed.

And the good news today I have the 'rendered file' option in the list of file format.

My solution for D7:

  • Download current file_entity module to your modules directory (sites/all/modules)
  • Remove old file_entity module from media module directory (their was an old 1.x version of the file_entity module included!)
  • Clear cache
  • Run update.php (their should now be some pending updates of the new file_entity module)
  • Now you could select 'rendered file' in the manage display for your embedded media file field and could do settings similar to the Multimedia asset field type

I hope this help some others!

Greetz from Germany
Steffen

danielhonrade’s picture

#16 - thanks, that works.

I also tried this:

  • media - 2-dev
  • emfield - 1-alpha1
  • file_entity - 2-dev
  • media_youtube - 1-beta3

Configurations on viewing previews, files, etc. are in /admin/structure/file-types/manage/video/file-display

Eleven-Drupal’s picture

Thanks all & Steffan #16...got it working.

Strangely the youtube logo only appears in my mobile version (I've got it in a slideshow). Have got the option to hide youtube branding unselected but still not there on site.

Not expecting an answer as it's not critical but odd that on 1 medium but not another.

cfbauer’s picture

Thanks for this!

calefilm’s picture

I just want to make a note here for my own records.. I tried this method mentioned in #16 and though I did get the rendered file option I just got an image to show and no video. My goal was to add a youtube url link.. And cannot understand the purpose of this module as I need the Media module and then have to apply the Media Youtube module.. and the only way i can attach videos is to go to my manage field and add "Multimedia Asset" in the Field dropdown list and "Media File Selector" for Widget.

In that case, after I set the settings correctly in my Media File Types, I get the video to display fine.

For the future, i would like to allow users to simply paste a url from youtube (etc 'all sites') and to have it display like in "video embed field module" http://drupal.org/project/video_embed_field

In any case, I am so utterly confused after spending a day trying to embed a simple video url that I am just making a note to myself that I do not understand the difference between Embedded Media Field, how the media module applies in this case, and how many contributed modules I have to add besides media youtube module before I can have users simply embed urls on my site that connect to other sites. I'm assuming in the next few years there will just be one solution instead of all of these various plug-ins. That being said, I think everyone has done the best job they can. I'm not a programmer and appreciate all the work drupal developers have done over the years :)

seaneffel’s picture

I think you have found the pitfall of this enormous Media module project. The Media module is just a foundation and framework for handling media of all types. It has a lot of dependencies and requires further extension to be useful to site admins.

Yes, to embed Youtube videos you need Emfield and Media: Youtube. To use those you need Media. To use Media you need Views. Views requires Chaos Tools. Somewhere in there you need File Entity. That's at least six modules worth of independent development cycles, bugs and maintainers to get what looks like a simple task done. It risks alienating new users who just want to get their work done - and probably don't want to or can't be developers.

It would be helpful if there were some guide for people like calefilm to follow that would get more people adopting and participating in the Media project. If these projects were more stable and I knew my documentation would be useful for a long time then I would be happy to write them up myself.

endless_wander’s picture

I just want to note my thanks to all who have worked and maintained this module.

I'm finding it hard to get working with a YouTube field as others here have noted.

As far as documentation goes, it seems like the text on the project page is quite out of date. Perhaps updating that to make users aware of the module dependencies would be a good place to start?

The references to the "Included Modules" such as "Embedded Video Field" seem to apply only to the 6.x version...

sunset_bill’s picture

Is 'file' the only field type option? I'm trying to add an EMF programmatically and what I end up with in my add/edit form is a file upload widget that doesn't accept a URL. I'm also having the same problem as others with getting a video to display (all I get is a link), even after upgrading file_entity per comment #16, but right now my focus is to get my field definition right.

I am getting the same display options as listed in comment #5, but even after selecting Rendered File, YouTube Video and YouTube Preview Image for my displays, all I get on a node with an Embedded media field widget (this with an attempted Embedded Media Field added via the Field UI) is a link to the video I'm trying to embed, not an embedded video.

thanks,
SB

sunset_bill’s picture

OK, got mine working with a Youtube video.

In the module definition for my embedded video field:
field type => file
widget type => enfield_widget
display type => file_rendered

/admin/structure/file-types/manage/video/file-display:
enable Rendered File
enable YouTube Video (need Media: YouTube module installed and enabled)

/admin/structure/types/manage/<my_type_with_embedded_video_field>/display:
set Video field format to Rendered file (This overrides the setting in file-display and was Generic file by default. Changing it to Rendered file got rid of my link-instead-of-video problem. Eliminated need for this step by specifying file_rendered for the display type in my field definition code)

djhspence’s picture

@seaneffel did you ever figure out the emfield migration from D6 to D7? I've tried/read everything I can in the past four days and come up with nothing. It's the only thing holding up my upgrade and it's killing me.

samwillc’s picture

Here's what I've done in Drupal 7 after installing Media:YouTube and Emfield:

a) Created a content type video
b) Field name 'Video'
c) Field type = file
d) Field widget = Embedded media field

Manage display tab

e) Video format = rendered file
f) View mode (??) = got choices 'Default, Link, Preview, Small, Large, Original, Tokens' - chose Original although I don't even know what this is doing

At /admin/config/media/file-types/manage/video/file-display

g) Enabled displays <-- what does this even do? I checked youtube videos.
h) Display precedence order <-- what is this?
i) Youtube video = enabled (in vertical tab)

Now I've got a load more options, youtube player theme, width, height, autoplay, display video title etc... However, changing any of these options does nothing, the video on the node page still looks like a standard youtube video. Light theme doesn't make it light, changing the size doesn't do anything.

Shouldn't youtube video appear in the "f) View mode" dropdown in the manage display tab on the content type?

This module is quite confusing, but I'm sure it will be great once it works for me!

Sam.

samwillc’s picture

Forget that, it's working perfectly now using content type manage display = rendered file, view mode = default.

Then in /admin/config/media/file-types/manage/video/file-display

Under enabled display I only choose youtube videos, the settings now work, can get light frame, change video size etc...

I presume the settings in: '/admin/structure/types/manage/video/display' are overwritten by the settings in: '/admin/config/media/file-types/manage/video/file-display' when 'default' is chosen.

Sam.

seaneffel’s picture

Right, but have you tried editing nodes with media fields to see if it can resubmit them without errors?

samwillc’s picture

@seaneffel, no I haven't yet.

After a bit of digging around, I am under the impression that I would actually only need 2 modules to make a third party video site:

http://drupal.org/project/media_youtube

and

http://drupal.org/project/media

So I wonder whether we even need to use 'embedded media field' at all anymore?

Sam.

Snufkinski’s picture

Thanks all & Thank you for share your solution, IT-Cru.

It solved my issue (Notice: Undefined index: label in file_entity_file_display_form()...).

Drupal 7.16
File entity 7.x-2.0-unstable6
Media 7.x-1.2
Media: YouTube 7.x-2.0-rc1

docker’s picture

#16 - Thank you!
It works fine.

jlea9378’s picture

I'm so confused. I have the most recent modules installed (per above comments), and I have it working perfectly with YouTube videos. But how the @#$@ do I get this thing working with videos hosted on my own webserver?

Ideally I would like users to be able to select and upload a video, then save the page, and have it appear embedded on the page. This is how it works with images.

I tried entering the URL to a video that exists in my files repository on my site, and after I saved the page a link appeared to the video (instead of the video itself appearing). Clicking the link to the video works. But I want it to be embedded.

Entering the address to a YouTube video instead works perfectly.

memcinto’s picture

I tried various recipes given in the comments, without success. I did finally succeed by installing the 7.x-2.x-dev (2012-Dec-13) version of Media: Vimeo.

jmlavarenne’s picture

I needed to provide my users with a way to copy a youtube url to display an embeded video in a node.
I was able to do this in two ways.

The easy way (that's very much like it used to be before D7 and the Media module):
https://drupal.org/project/video_embed_field
You can adjust the display sizes here: admin/config/media/vef_video_styles
Super easy - create a video embed field and you are good to go.

The harder way:
Install media, media youtube, file_entity, emfield.
Create a field of type file and widget Embedded media file.
Go here admin/config/media/file-types/manage/video/file-display and check the two youtube boxes under "Enabled displays".
Go to your node type's manage display page and choose "Rendered files".

I can't see the benefits of using the Media module for this simple task at the moment. I certainly don't want to confuse my user and give the impression that it is possible to upload files.