Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have been able to add video and audio mediaelement players using Content Types and fields. After looking at the mediaelementsjs.com site I got the impression I could add the players to a Basic Page Node using the CKEditor and HTML code. Am I wrong or has anyone been able to do this? Sorry if this is a dumb question, I'm new to Drupal.
Thanks, Ethan
Comments
Comment #1
JamesBecht CreditAttribution: JamesBecht commentedsubscribe... same question.
Comment #2
ar-jan CreditAttribution: ar-jan commentedI was also looking into how to use this. I know next to nothing about MediaElement/HTML5, but here's what I did and it seems to work. Let me know if there's a better way.
<audio>
and/or<video>
tag to the allowed HTML tags.<audio id="audioplayer" src="/sites/default/files/my-audio-file.mp3"></audio>
I'm using this as a workaround, adding the audio files themselves via Media module in the hope/expectation audio (e.a.) will be supported by Media in the future. Issue: #1016376: Expose the media types allowed for WYSIWYG variable in the UI.
Comment #3
mfer CreditAttribution: mfer commentedFor audio in a textarea you'll need to follow what #2 outlines. If you want to use Video you can follow what #2 outlines or you can setup mediaelement to be the player through the media module and insert video inline.
Basically, #2 hit it.
Comment #5
smscotten CreditAttribution: smscotten commentedSorry to reopen an issue, but I'm looking for further clarification.
The first step in #2: "install MediaElement as per readme.txt" includes a bunch of code that should be added to the page, but it's not specific as to how or where. My best guess is that that code needs to be added to theme_preprocess_page() in one's theme's template.php file. Is this right?
Also, it's not clear in #3 how much of the process in #2 can be replaced by setting up mediaelement through the media module. Obviously the module still needs to be installed so it's not all of #2. If I want to drop a video into an arbitrary node without adding fields, can I do that with the media module and not mess with my template.php file?
Thank you!
Comment #6
ar-jan CreditAttribution: ar-jan commentedFor basic usage you don't need to add any code, I was referring to these steps in the Drupal module's readme.txt:
1. Download MediaElement from http://mediaelementjs.com/
2. Unzip into a libraries directory as supported by the libraries module with the name mediaelement (e.g., /sites/all/libraries/mediaelement).
3. Install the libraries and mediaelement modules.
I have so far only used this with audio I uploaded via Media module and then inserted manually into the node's body , but I don't think you need to have any code in template files for video usage.
It looks like you just go Configuration > Media > Media Types > Video: Manage display, and there select 'MediaElement Video' as the formatter, and insert the video into the body.
Actually, it looks like this should also be possible for audio files now, if correct, is that newly added?
Edit: or maybe not yet for audio, I just read http://drupal.org/node/1016376#comment-4850054.
Comment #7
smscotten CreditAttribution: smscotten commentedOK, thank you.
1. Got that
2. Check.
3. Got it.
I have Configuration > Media > File Types rather than "Media Types" but I assume they are the same thing.
From there, Video > Manage Display looks like it refers only to fields. But there is also "Manage File Display." That gives me a list of "Enabled Displays", "Display Precedence", and "Display Settings." Nothing labeled a formatter and none of these sections has any tooltip help to enlighten as to their purpose.
Under Display Settings are tabbed display types (MediaElement Video appears twice.) Clicking on one of those brings up the same list of "Enabled Displays" and "Display Precedence" to order the display types that are selected. Can you provide some kind of context as to what I should do with all this? "Select 'MediaElement Video' as the formatter" doesn't match up to what I'm seeing.
Comment #8
ar-jan CreditAttribution: ar-jan commentedThe site I was checking is still on an older version of Media, I read that there was a significant change which is why you're seeing 'Manage File Display', etc. instead of what I wrote.
I would try out all options related to 'Display...', and choose MediaElement Video. It seems like this should just work, but I haven't tried it yet. Or someone else could chime in with more informed advice...
Comment #9
luthien CreditAttribution: luthien commentedHi, the module works fine but I have a small problem. The player is not visible for droid phones. Can anyone test it and let me know if they see the player in a droid device? this was for playing a MP3 file.
Comment #10
DjBoogy CreditAttribution: DjBoogy commentedSame thing over here too
Comment #12
jnettikThis is an old issue. Closing.