Use HTML 5 Media

Lectora publishes audio and video content such that it will be played by Flash, if Flash is present, and by HTML 5 if it is not. Some have expressed interest in having the preference reversed, such that Lectora content will use HTML 5 if the browser is capable, otherwise use Flash. By placing this Library object at your title level, your title will use HTML 5 to play media wherever possible.

A few caveats go with that:  

  • The dimensions and look of the player are not consistent between browsers, especially with the Audio Controller on IE. Make sure you give yourself plenty of room, or use views other than the controller.
  • The HTML5 Players will not be used within “run mode” in Lectora itself, only when used within a browser, as they are specific to the browsers.


Preview image



  1. Profile photo of Joe Payne
    Joe Payne

    Thanks John, this javascript code is even better than the one I had before. This code is an absolute for accessibility developers than need HTML 5 audio and video in their titles, and cannot use the flash players, because they have issues with screen readers!!!

  2. Profile photo of finaidmedia

    Thanks, John. We’re looking to remove as much Flash as possible from our courses, and this was very helpful.

  3. Profile photo of Andy Lockwood
    Andy Lockwood

    This may be something to do with our own system, but in adding this to my course, I found it did not do anything when added at the title level. If I added it directly to a page with a video, it worked great!

    We have been having issues with video at work that I believe we have narrowed down to a Flash issue, so this was exactly what we needed. Thanks!

  4. Profile photo of John Blackmon
    John Blackmon Post author

    Hmmm…. I wonder if the page (or containing chapter or section) is not inheriting anything from its parent, and that’s why it didn’t pick it up from the title?

  5. Profile photo of Annette Williams
    Annette Williams

    This. Just. Saved. My. Life. Our company is removing Flash from all computers…and my tester was one of the first. She kept receiving errors….until I applied this. I applied it to every page, just to be safe. Not sure if I had to, but I had to move fast! As a side note, I had her test the Lectora Viewer functionality….and this code DOES NOT WORK for that feature. Flash will still be assumed on a PC. Just wanted to share…..because I thought that this External HTML was failing….but it wasn’t. I was the fail. LOL Thanks sooooo much for sharing!

Your email address will not be published. Required fields are marked *