Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22733

Support HTML5 videos from Youtube if the browser supports it.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.3
    • Component/s: Filters
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Update the mediaplugins filter so that it produces some smarter HTML, so that:

      1) If the current browser supports HTML video (eg iPad) then use it
      2) If not, then fallback to Flash object

      Some tips: http://futtta.be/newTube/

      One caveat: the resulting HTML should be delivered the same to every browser, because of filtered text caching in Moodle.

        Gliffy Diagrams

          Activity

          Hide
          paradox Darryl Pogue added a comment -

          Since Moodle already uses YUI3, another option might be the HTML5 Player YUI widget: http://yuilibrary.com/gallery/show/player

          Not sure if this will play nicely with filtering though...

          Show
          paradox Darryl Pogue added a comment - Since Moodle already uses YUI3, another option might be the HTML5 Player YUI widget: http://yuilibrary.com/gallery/show/player Not sure if this will play nicely with filtering though...
          Hide
          dougiamas Martin Dougiamas added a comment -

          Unfortunately, this widget is designed for when you have the direct URL to the movie files, and I don't think we can get this for Youtube videos ... can we?

          Show
          dougiamas Martin Dougiamas added a comment - Unfortunately, this widget is designed for when you have the direct URL to the movie files, and I don't think we can get this for Youtube videos ... can we?
          Hide
          dougiamas Martin Dougiamas added a comment -
          Show
          dougiamas Martin Dougiamas added a comment - Is it this simple? http://www.youtube.com/watch?v=dYYG8xsuW5w
          Hide
          dougiamas Martin Dougiamas added a comment -

          For anyone interested in solving this, look at filter.php in http://cvs.moodle.org/moodle/filter/mediaplugin/

          Show
          dougiamas Martin Dougiamas added a comment - For anyone interested in solving this, look at filter.php in http://cvs.moodle.org/moodle/filter/mediaplugin/
          Hide
          jrh18 Jason Hardin added a comment -

          Just some searching, but seems that http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html method handles the determination of html5 or flash for the developer as part of the embed code. Maybe this method has accessibility issues as it is an iframe.

          I used '<iframe class="youtube-player" type="text/html" width="640" height="385" src="'.$site.'youtube.com/embed/'.$url.'" frameborder="0">
          </iframe>' in replace of the object code for the filter. However this failed to work on the iPod touch giving me a flash error.

          From what I can tell the video embed tags for youtube require the user to be part of the beta program still. http://www.youtube.com/html5 That link details the information the additional restrictions seem pretty key.

          I tested a video on iPod touch today from youtube using the object embed code and it worked fine, it didn't play inline it loaded the youtube app on the iPod touch.

          Show
          jrh18 Jason Hardin added a comment - Just some searching, but seems that http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html method handles the determination of html5 or flash for the developer as part of the embed code. Maybe this method has accessibility issues as it is an iframe. I used '<iframe class="youtube-player" type="text/html" width="640" height="385" src="'.$site.'youtube.com/embed/'.$url.'" frameborder="0"> </iframe>' in replace of the object code for the filter. However this failed to work on the iPod touch giving me a flash error. From what I can tell the video embed tags for youtube require the user to be part of the beta program still. http://www.youtube.com/html5 That link details the information the additional restrictions seem pretty key. I tested a video on iPod touch today from youtube using the object embed code and it worked fine, it didn't play inline it loaded the youtube app on the iPod touch.
          Hide
          skodak Petr Skoda added a comment -

          Hello,
          I have tested this extensively yesterday, so far it seems that the good-old embed way works the best:

          • works fine on ipad
          • is consistent when playing videos and playlists

          The iframe method did not work for playlists, it is not xhtml strict and there were some problems on iPad.

          I am proposing "will not fix" resolution. I doubt that the situation is going to change much for the next few years due to IE+XP legacy systems.

          Ciao

          Show
          skodak Petr Skoda added a comment - Hello, I have tested this extensively yesterday, so far it seems that the good-old embed way works the best: works fine on ipad is consistent when playing videos and playlists The iframe method did not work for playlists, it is not xhtml strict and there were some problems on iPad. I am proposing "will not fix" resolution. I doubt that the situation is going to change much for the next few years due to IE+XP legacy systems. Ciao
          Hide
          skodak Petr Skoda added a comment -

          To be revisited once the iframe playback starts working 100% on iPads...

          Show
          skodak Petr Skoda added a comment - To be revisited once the iframe playback starts working 100% on iPads...
          Hide
          skodak Petr Skoda added a comment -

          Youtube just fixed iPad playback issues when iframe used, I am going to submit a patch for the next weekly build.

          In case of custom videos (embedded using the mediaplugin filter) users already have following options:
          1/ html 5 video with multiple sources with a quicktime fallback
          2/ new flow player with html5 video fallback

          In the future we could create a new module which does the recoding of videos automatically.

          Show
          skodak Petr Skoda added a comment - Youtube just fixed iPad playback issues when iframe used, I am going to submit a patch for the next weekly build. In case of custom videos (embedded using the mediaplugin filter) users already have following options: 1/ html 5 video with multiple sources with a quicktime fallback 2/ new flow player with html5 video fallback In the future we could create a new module which does the recoding of videos automatically.
          Hide
          skodak Petr Skoda added a comment -

          I have submitted PULL request for the next weekly review, thanks for the report.

          Petr

          Show
          skodak Petr Skoda added a comment - I have submitted PULL request for the next weekly review, thanks for the report. Petr
          Hide
          tsala Helen Foster added a comment -

          This issue is fixed in this week's 2.0.2+. Thanks everyone

          Show
          tsala Helen Foster added a comment - This issue is fixed in this week's 2.0.2+. Thanks everyone

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/May/11