From b7470fa3239bca8858ee215adf59118ed12fa581 Mon Sep 17 00:00:00 2001 From: teawithfruit Date: Tue, 21 Jul 2015 15:59:19 +0200 Subject: [PATCH] solves early access error with video element This will maybe solve the "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable" error in firefox. --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reveal.js b/js/reveal.js index a0120b4..2b8476f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2612,7 +2612,7 @@ // Start video playback var currentVideo = currentBackground.querySelector( 'video' ); if( currentVideo ) { - currentVideo.currentTime = 0; + if(currentVideo.currentTime > 0) currentVideo.currentTime = 0; currentVideo.play(); }