I needed this for a client's project, and here it is:

Enable it for one of the input formats, say filtered html or whatever. It allows you to enter:
[brightcove:1330545631001] in your node's body and it will use the module's theme functions to display the player with the video "1330545631001".

I believe this is the way to go for providing wysiwyg integration properly (no need to worry about flash markup etc being filtered (see #1342754: Add WYSIWYG embed support)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Manuel Garcia’s picture

I forgot to mention this adds a new submodule, so people needing it would have to enable it.

Manuel Garcia’s picture

Here's a revised version of the patch above.

It seems that theme_brightcove_cck_formatter_default calls drupal_set_html_head to add the brightcove external js file, and since filters are only ran once when saving a node and its results cached, we have to add it directly into the output inline ourselves.

We might want to consider adding this file to the page using hook_init perhaps, to avoid these problems and increase reusability of current code.

You can see this filter being used in production here (bottom of the article):
http://www.autobild.es/noticias/muere-Jorge-Mart%C3%ADnez-Boero-dakar-20...

meba’s picture

I like this. What is clear from this patch is that the formatter might need refactoring as you had to implement crazy fake $element in order to be able to print the content. Maybe we should refactor that, split out a real easy theme fnuction and reimplement that? Do you think you could look at that (maybe in a separate issue)?

THanks!

Manuel Garcia’s picture

Status: Needs review » Postponed

I'd be very much interested in making progress in that direction, sure!

I've created a meta issue to discuss the necessary changes, let's discuss it there:
#1392474: [META] Refactor cck formatter & related theme functions for flexibility

I'm changing the status to postponed, as I think this should be implemented properly once the rest is done. Of course you're welcome to make the commit and then after make the adjustments so that people start using it, your choice.

k.dani’s picture

Issue summary: View changes

We are working on the 7.x version of the module, but as soon as we have chance to check it, we review it.

jedihe’s picture

Title: Input fitler for embedding videos [PATCH] » Input filter for embedding videos [PATCH]
k.dani’s picture

Status: Postponed » Needs review
k.dani’s picture

We don’t maintain the Drupal 6 version of the module, but apply patches (if it is in RTBC status) until the stable version of Drupal 8 is released.

jan.mashat’s picture

Status: Needs review » Closed (won't fix)