Use oEmbed to embed more external content

Bug #956866 reported by laurentopprecht1
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Currently the external Video block supports fixed list of content providers. Which happens to be quite limited.
Another approach to support external content is to rely on meta data provided in the page to extract the content and embed it. Two protocols exists to do that:

- open graph protocol - i.e. Facebook
- oEmbed

Those two allows you not only to embed videos but more generaly to add rich content - slides, audio, etc. Both are very well supported by content providers.

Those protocols are open ended, that is you are not limited to a fixed list of sites but allows you to embed content from any site supporting them.

We developped our own artefact plugin to circumvent those limitations - another one exists based on - but I believe it would make sense to extend/modify the video block and provide support at the core level.

Revision history for this message
laurentopprecht1 (laurent-opprecht) wrote :

Ah right here is the plugin with a bit more information:

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Laurent,

The External media block is going to change for Mahara 1.6 as per

We will start on the feature of changing the block soon (finish is targeted for end of March 2012).

Your idea of including oEmbed etc. sounds good. If you want to suggest this feature for core, it must go through the review process. You can find more information on contributing code at


Revision history for this message
laurentopprecht1 (laurent-opprecht) wrote :

Cheers kristina,
I had a look at the spec. Indeed, I believe it would make more sense to integrate oembed, etc to the core instead of leaving that in an external plugin that superset an existing core feature.

One related question would be wether Mahara is limited to a fixed set of sites or if the list is open ended? Personnaly I would at least leave the option for the administrator to leave the site open if he wants to. Obviously a point to discuss.

Looking at the doc I imagine I have to submit a patch for core review right? I can certainly do that, hopefully by the end of this month. The only requirement would be to add the University of Geneva to the list of contributors.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Laurent,

What do you mean by "leave the list open ended"?

I would suggest to do it in two steps as it would get too difficult to review if everything is in one go:

1. We change the existing external media block as per the specs on the wiki.
2. You add your code. You can also put the specs onto the wiki under "Specifications in Development" and then add the U of Geneva.

Revision history for this message
laurentopprecht1 (laurent-opprecht) wrote :

The way I read the spec is that we are going to have one filter per site - youtube, etc. The benefit is that we are using the same code for the filters and for the media block. On the other hand we are still going to have one filter per site we want to support. The other way of supporting external content is by locating and copying some kind of html code from the site.

The advantage of oembed, ogp is that you don't have to write code per site but only once for all. So any site supporting them will work out of the box.

For the filter part you don't want to test every single url. So you may want to have list of url patterns you want to support. I.e. youtube, dailymotion, etc. I believe this explains why we are only supporting a fixed number of sites in the specs. On the other hand I don't believe there is a reason to limit the media block to a fixed number of sites when much more can be supported.

I have just added a line in the spec to provide visibilty on what we intend to do.

I am fine with waiting about the current changes. I would just appreciate to receive a warning when it's done.

Revision history for this message
Juan Segarra Montesinos (juan-segarra) wrote :

+1 on this to be included.

Changed in mahara:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: externalvideo
tags: added: block
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I changed the title of this wishlist item to be more encompassing after

For security reasons, I think we might want to tie that in with our allowed iframe sources and have an internal allowlist like we do have for iframes.

summary: - Use oEmbed/ogp for the external video block to support more sites?
+ Use oEmbed to embed more external content
Revision history for this message
Patric Lougheed (patriclougheed-com) wrote :

The Humhub project has recently added oEmbed support and it look very interesting.

The ability to add oEmbed providers is a must as things like WordPress blogs now give oEmbed data. Allow lists would need more data than just URLs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers