Social forum

Autoview Preview for Moodle 2.x

 
Picture of Mark Davis
Autoview Preview for Moodle 2.x
by Mark Davis - Friday, 12 August 2011, 8:04 PM
 
I found one more thing that may be a bug or may be intentional, however, a change would be helpful. smile

When watching PPT slides with a video synced, click on the very first slide does not make the video jump back to time "0:0.0" (i.e. the beginning of the video). I found no way to change the time on the first slide (there may be a way, but it wasn't obvious to me), but even if I could, since clicking on it will not change where the video is playing, it makes no difference. Is this intentional (and if so can it be changed), or a bug that needs to be fixed? Thanks!
Picture of Tim Williams
Re: Autoview Preview for Moodle 2.x
by Tim Williams - Saturday, 13 August 2011, 9:13 AM
 
The slide time for the first slide is intentionally fixed at 0:0.0, since a slide has to be displayed if the slides are active. (use a blank 1st slide if you don't want anything visible when the presentation opens).

That said, the presentation should skip back to 0 when you click on the first slide. Which video type and web browser are you using and do you get the same problem with a different browser?
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Saturday, 13 August 2011, 12:33 PM
 
I figured it might be fixed to 0:0.0, which is fine. However, no matter which browser I use so far (IE & FF), it does not take me back to the beginning of the video. I'm using HTML5 which I've enabled (which, by the way, works awesome!!). It allows us to use a single video source for ALL the platforms we've tested so far (iPhone, Android, & PC) - thanks for the great work!
Picture of Tim Williams
Re: Autoview Preview for Moodle 2.x
by Tim Williams - Wednesday, 17 August 2011, 1:49 PM
 
Just did a few extra tests, I can confirm that the problem exists in Firefox, IE and Safari. Chrome works correctly and goes back to time index 0:0.0 when the first slide is selected.

I think i've found the cause, the time index being passed for slide 1 is an empty variable rather than 0, some video players interpret this as 0, others ignore it. If you drop the attached autoview.js file into your AutoView installation it should fix the problem. If that works for you, then i'll include this fix in the next release.
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Wednesday, 17 August 2011, 3:00 PM
 
Thanks Tim,

that fixed it (and it still works in Chrome, but I bet you knew that ;).
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Monday, 29 August 2011, 9:02 PM
 
Bummer Tim!

More testing reveals that although it fixed this problem, it broke something else. Now the slides don't advance automatically. I don't know how I missed that, I must have only tested clicking and jumping and assumed that this fix wouldn't mess with the auto-advance. So I can click on a slide and the video will jump to the corresponding/correct time, but if I just let the video play, the slides never advance (neither does the current thumbnail).
Picture of Tim Williams
Re: Autoview Preview for Moodle 2.x
by Tim Williams - Tuesday, 30 August 2011, 11:07 AM
 
Just done a few tests and so far I can't replicate this problem. Auto slide advance is working on FF/Chrome/Safari/IE with HTML5 sources.

Are you seeing any javascript errors in the error console? (Tools>Error console on FF if you haven't used it before).
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Tuesday, 30 August 2011, 6:57 PM
 
I don't see any Javascript errors. I can duplicate the problem repeatedly in IE9, but it seems to work fine with Safari. I can't test in FF because we are using HTML5 video that is using codecs not supported by FF.
Picture of Tim Williams
Re: Autoview Preview for Moodle 2.x
by Tim Williams - Wednesday, 31 August 2011, 2:57 PM
 
OK, I have now replicated this on my server.

The problem seems to be that when the presentation first loads IE is trying to check current video position before the video is ready, the check fails and causes the video position monitor to exit, thereby causing the slide sync to fail. I've now inserted some extra code which will prevent the video position check from causing the monitor to exit if the video isn't ready.

In theory this problem could manifest itself on any browser, it all depends on which bits of the page get loaded first and how quickly the various resources are initialised.

I've attached an update to autoview.js which should correct for this, please let me know if it this solves it for you.
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Wednesday, 31 August 2011, 7:47 PM
 
Unfortunately I get the same results. It works in Chrome, but not in IE9. Still no errors that I see...
Picture of Tim Williams
Re: Autoview Preview for Moodle 2.x
by Tim Williams - Thursday, 1 September 2011, 4:45 PM
 
OK, one more go. IEs Javascript engine is being flaky....

The problem seems to be that the code I put in yesterday to check if the video was ready in order to prevent an error stopping the position monitor is itself giving the same error in some circumstances (which shouldn't be possible, since it defeats the object of the test method), so I think there is a bug in IE.

I have put in some code which will trap this particular error when it happens in IE and stop it from killing the video position monitor, not an ideal solution but it's the best available. Hopefully that will enable the slide sync to work, since the underlying error will go away once the video finishes loading.
Picture of Mark Davis
Re: Autoview Preview for Moodle 2.x
by Mark Davis - Thursday, 1 September 2011, 8:47 PM
 
Thanks Tim!

Has IE's javascript engine ever not been flaky? ;)

Works fine now in both IE and Chrome! Chrome sure gives the best HTML5 video experience for some reason.