Filters: oEmbed Filter

filter_oembed
Maintained by Picture of James McQuillan James McQuillan, Picture of Mike Churchward Mike Churchward
A filter that will swap hyperlinks pointing towards supported websites with an embedded version using code retrieved from the site using the oEmbed protocol. An option for "Lazy" loading of some sites is also available.
965 sites
834 downloads
20 fans

Using the oEmbed protocol http://oembed.com/ hyperlinks pointing to supported sites will be substituted with an embedded version.

N.B. You may need to disable YouTube and Vimeo in the Admin->Site Administration->Appearance->Media Embedding

This helps send students to videos on external sites but without leaving Moodle and being distracted by other content.

As of 3.2, the media sites that are supported are the ones defined at http://oembed.com/#section7 (JSON: http://oembed.com/providers.json). You can also modify or add provider info locally to your site.

See the "README.txt" file for more information on managing providers.

Pre-3.2, the supported sites are:

  • YouTube *
  • Vimeo *
  • Ted *
  • SlideShare
  • Screenr
  • Issuu
  • Poll Everywhere
  • Soundcloud
  • Microsoft Mix
Sites with * also support optional "Lazy" loading. For these sites a thumbnail still of the video is shown that is swapped for the actual video when clicked upon. This speeds up page load times and reduces bandwidth.

Sets

This plugin is part of set Office 365.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Picture of James McQuillan
James McQuillan (Lead maintainer)
Picture of Mat Cannings
Mat Cannings: Original author
Picture of Vinayak (Vin) Bhalerao
Vinayak (Vin) Bhalerao
Picture of Nima Mojgani
Nima Mojgani: Manager
Picture of Akinsaya Delamarre
Akinsaya Delamarre: Contributor
Picture of Guy Thomas
Guy Thomas: Contributor
Picture of Erich Wappis
Erich Wappis: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of James McQuillan
    Wed, 9 Dec 2015, 12:45 PM
    Hi Daemon - can you post some examples of the links you were using to help debug what might be going on? Thanks!
  • Picture of Astrid Callista
    Tue, 29 Mar 2016, 4:00 PM
    Hi, I'm trying to use this for embed soundcloud urls but it shows "Error while accessing the embedded media. Please try refreshing the page."
    I've disabled and even tried uninstalling soundcloud filter but it won't work. Can you help?
    Thank you
  • Picture of Astrid Callista
    Tue, 29 Mar 2016, 4:04 PM
    Sorry, to add to my previous question, this doesn't work if my soundcloud file is set to private so is there a work around for this? Thank you
  • Picture of James McQuillan
    Mon, 4 Apr 2016, 3:32 PM
    It only doesn't work when the media is private? I would imagine that's probably a soundcloud privacy thing, to keep private media private. Are you seeing that for public media?
  • Picture of Peter Sercombe
    Thu, 26 May 2016, 8:29 AM
    I've tried to submit this to the tracker, but it won't allow me until I find a similar, open issue and watch it. Unfortuantely, I can't find one... so here goes.

    We've encountered an issue whereby if a user attempts to embed a secure, shortened URL for a YouTube video, the video embed errors.

    Steps to reproduce:
    * Enable YouTube embedding via oembed filter
    * Disable YouTube embedding via default Media Embedding
    * In a label or page add a link to a YouTube video using a shortened, secure URL (e.g. )

    Expected behaviour: When page is saved and viewed, the video embeds into the page.

    Actual behaviour: Message is displayed - "Error while accessing the embedded media. Please try refreshing the page."

    Using Moodle 2.9.3 (over https) and plugin version 29.0.0.8
  • Picture of Peter Sercombe
    Thu, 26 May 2016, 8:31 AM
    Bother - the URL was embedded in my comment. It was meant to provide an example of the type of URL we've tried to embed - i.e. https:// youtu.be/[video ID]
  • Picture of Luca Bösch
    Tue, 11 Apr 2017, 7:23 PM
    Could you guide me how you can circumvent oembed e.g. when you really want to display the YouTube URL but not embed the YouTube player?
    Thanks a lot.
  • Picture of Guy Thomas
    Tue, 11 Apr 2017, 9:08 PM
    @Luca. There's an Atto plugin that you can use with the filter that provides that capability. You have to configure the filter to use the oembed div wrapper instead of anchors. This isn't in the plugin dB yet but you can get it from https://github.com/AnsonArgyris/moodle-atto_oembed
  • Picture of Mike Churchward
    Tue, 11 Apr 2017, 9:30 PM
    1) Disable Youtube filtering in the Oembed plugin. No good if you don't want it disabled everywhere.
    2) Use the
    tag style instead of the style in the Oembed settings. You would need to change the content everywhere that you have filtering currently.
    3) Display the link you don't want filtered using escaped HTML anchors. So instead of <a> tag, you use & lt;a& gt; . (remove spaces after &).
  • Picture of Henrik sune Pedersen
    Fri, 21 Apr 2017, 6:35 PM
    We have almost similar problem. When sending links in messages, the youtube links gets removed from the message when the oembed filter is enabled. I write this in the mesage text area : https://www.screencast.com/t/45Qti6PUbkWY but only the text is recieved https://www.screencast.com/t/hR6A8m8Moid. And we cannot have the teachers and students using html tage, i dont think they would remember that. smile

    Hopefully theres a solution i havent tried / overseen.

    Kind regards
    Henrik Sune Pedersen
  • Picture of Mike Churchward
    Mon, 24 Apr 2017, 10:34 PM
    There isn't currently any way that I know of to "selectively" filter oembed tags. Its kind of all or nothing. But, you can use div tags instead of HTML tags, so that you can precisely choose what you want to filter.
  • Picture of Madhu Avasarala
    Sun, 14 May 2017, 3:57 AM
    Hi,
    I am trying to upgrade to the latest version of the filter plugin. I am on 3.2.3+. I am getting the following error:
    Table "filter_oembed" does not exist"
    Moodle hangs at this step. I can recover by restoring from a snapshot made just before update. Any help will be appreciated.
    Thanks,
    Madhu
  • Picture of Guy Thomas
    Mon, 15 May 2017, 7:49 PM
    @Madhu - it sounds like the upgrade script failed. You could try to force it to run again by running this SQL:

    update mdl_config_plugins set value = '2016000000' where plugin = 'filter_oembed' and name = 'version'

    And then go to /admin

    I advise you to try this out in a test environment / clone of your site first.
  • Picture of Mike Churchward
    Mon, 15 May 2017, 8:56 PM
    @Madhu - if the table "filter_oembed" doesn't exist, and the oembed filter is trying to upgrade, then someone must have manually removed the table. You probably need to uninstall the filter and then reinstall it. You should be able to uninstall the plugin from the plugin admin screen.
  • Picture of Guy Thomas
    Mon, 15 May 2017, 9:19 PM
    @Madhu - Mike's solution is better than the one I suggested! smile
1 2
Please login to post comments