Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.3
    • Fix Version/s: DEV backlog
    • Component/s: Filters, General, Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      4953

      Description

      Our teachers want students to be able to embed videos from youtube, googlevideo, etc. We've been searching for solutions like MultiMovie (thanks to Eloy ) filter but thought that maybe letting them to embed object and embed tags directly from this sites will be better and less error prone.

      We've made a preliminary modification in clean_text() function that allows them to cut and paste the object code from three popular sites: youtube, google video and teachertube (like Multimovie). Currently just works with kses not html purifier, but works like HTML Purifier Youtube filter ( http://htmlpurifier.org/docs/enduser-youtube.html ):

      1. Find video embedding codes
      2. Extract the video id
      3. Replace each object with a span with each video id
      4. Clean object and embed tags
      5. Substitute the spans with our custom embedding code (the original embed or object isn't preserved)

      We've attached a patch against 1.9.3+ from weblib.php. It's a preliminar work just to start discussion... maybe there's a better solution.

      Thanks in advance,

      Juan

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Assigning to Petr for his consideration. Perhaps it would be a good idea to have some configuration option to be able to add sites from which we allow the object and embed tags? Empty by default, of course (current behaviour).

        That way each site could control those tags a bit better IMO.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Assigning to Petr for his consideration. Perhaps it would be a good idea to have some configuration option to be able to add sites from which we allow the object and embed tags? Empty by default, of course (current behaviour). That way each site could control those tags a bit better IMO. Ciao
        Hide
        Juan Segarra Montesinos added a comment -

        It'll be nice to have this kind of configuration

        I've been playing a little and implemented some sort of video embedding provider filters. See weblib.path.2.php and the zip included wich implements a videoembedding subsystem under lib directory. It contains some utility functions and a base class that serves as interface to "video embedding providers". There's a sample implementation for youtube, googlevideo and teachertube.

        Configuration can be done by adding a multichoice setting in security admins tab... i'll try to provide one.

        Thanks in advance,

        Juan

        Show
        Juan Segarra Montesinos added a comment - It'll be nice to have this kind of configuration I've been playing a little and implemented some sort of video embedding provider filters. See weblib.path.2.php and the zip included wich implements a videoembedding subsystem under lib directory. It contains some utility functions and a base class that serves as interface to "video embedding providers". There's a sample implementation for youtube, googlevideo and teachertube. Configuration can be done by adding a multichoice setting in security admins tab... i'll try to provide one. Thanks in advance, Juan
        Hide
        Juan Segarra Montesinos added a comment -

        weblib.php.2.patch uses the videoembedding subsystem implemented in videoembedding.zip

        Show
        Juan Segarra Montesinos added a comment - weblib.php.2.patch uses the videoembedding subsystem implemented in videoembedding.zip

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: