Use oEmbed/ogp for the external video block to support more sites?

Reported by laurentopprecht1 on 2012-03-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Unassigned

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 embed.ly - but I believe it would make sense to extend/modify the video block and provide support at the core level.

Ah right here is the plugin with a bit more information: http://code.google.com/p/mahara-artefact-external-resource/

Hello Laurent,

The External media block is going to change for Mahara 1.6 as per https://wiki.mahara.org/index.php/Developer_Area/Specifications_in_Development/External_media_block_extension

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 https://wiki.mahara.org/index.php/Developer_Area/Contributing_Code

Cheers
Kristina

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.

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.

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.

+1 on this to be included.

Changed in mahara:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: externalvideo
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers