Last year my institution installed the Lucimoo epub export tool for the Moodle Book module. I did some of the testing of it. I’m particularly interested (but not overly) in its ability to export a book resource as an ePub file (see I’m innovative, I support the kiddies and their fancy new mobile devices). While the export basically works, the testing identified a number of problems. I’ve fixed most of those (mainly tidying up my hand-crafted HTML and that produced by a few tools I use).
The one remaining problem is
The videos don’t show
The following is an exploration of if and how this problem can be fixed. I haven’t solved the problem. I am no expert. Feel free to point out flaws and recommend improvements.
- It is possible to use the epub export tool to produce ePub files that contain videos that will play in some ePub readers on computers.
- These ePub files don’t appear to work on mobile devices but this needs to be confirmed.
- For this to work you need to get direct access to the video file and for that file to be in a format that is linked by the HTML 5 video tag and the device/reader being used.
- To do this on Vimeo, you need a Pro account.
In my context, if I had access to a Vimeo Pro account I could in theory convert most of my “video embeds” over to using the Video tag and help enhance the experience of the ePub user. They would be able to play the video in iBooks on a computer, but not the phone. However, at least on the phone they would see some evidence of a video being present, rather than an empty space.
Beyond the cost of the Vimeo Pro account, that would also require converting all the embedded videos. There’s enough to be annoying.
Initial explanation of the problem
I assumed that the problem was due to my use of Vimeo to host most of my videos. In particular, that ePub readers (iBooks is what I test with) didn’t like the default Vimeo embed HTML. Possibly because the ePub reader doesn’t have sufficient smarts to parse and do something with the iframe etc.
It can work
This 2010 blog post provides proof that you can play video within an ePub file on a computer (MacOSX/iBooks) and a mobile (iOS/iBooks). Some level of proof given in the image below. If I hit the play button, the video plays quite nicely thank you.
Let’s try this with vimeo
Woo hoo! Sadly my quick initial skim (late last week) thought I’d found the solution. The “video” tag. Use that and all is good. (I was missing a few things because I only skimmed the article last week).
First question, can you use the HTML 5 video tag?
An answer to this question on Stack Overflow suggests that it is indeed possible and it provides an example.
In essence, you can find a direct link to an mp4 version of your Vimeo movie and use that with the video tag.
First problem with vimeo and the video tag
As pointed out by one of the comments on the answer to the Stack Overflow question, you have to have a pro Vimeo account to find the direct link to an mp4 version of your Vimeo movie.
A Vimeo pro account costs $USD219 a year. A little beyond the price I’m prepared to change. Wonder if there’s an institutional solution?
Second problem with vimeo and the video tag
The price is a bit of a bugger, but let’s test this with the Moodle Book module and the Lucimoo epub tool.
So I create a Moodle Book resource that contains three pages (chapters in Moodle Book speak) each of which embeds a video via different means:
- the video tag to embed the video from the original tutorial, to demonstrate it working;
- use the standard vimeo player to embed one of my videos; and,
- the video tag to embed the “direct vimeo video” from the answer to the Stack Overflow question.
Success, it works as expected when viewed on iBooks on the Mac. In addition, when viewing the Book via Moodle all the videos are playable.
The video tag embed from the original tutorial works and I can play the video of the kittens playing.
As expected the standard Vimeo player embed did not work. Just an empty page. No indication that there was meant to be a video embedded.
The problem is that it doesn’t work on the phone.
The standard Vimeo embed doesn’t work, as expected. But the use of the video tag to embed a Vimeo video shows a “play” button crossed out. Indicating some major problem.
It works if you embed the video in the ePub file
The ePub file from the original tutorial actually embeds the video file in the ePub file. It’s local. That’s why it works on the mobile phone.
For this to work with the Book export tool the videos would all have to be local to the book etc. Not likely to happen anytime soon.
The original tutorial post is titled “HTML5 Video Works on iBooks on iPad!!”. In addition, I’ve only tested this in iBooks, not other readers. The comments include mention that this approach is not “standard” and that the video playing will not work when viewing the ePub using “Adobe Digital Editions”.
Something that I can confirm. I can view the textual content, but not the video.
Not surprisingly it will work using the Firefox EPUBReader extension.