Created
February 6, 2015 02:45
-
-
Save harishvc/44ef94d4aa85d18d1478 to your computer and use it in GitHub Desktop.
Autoplay Prezi Slides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Autoplay Prezi using API</title> | |
<script type='text/javascript' src='https://cdn.firebase.com/js/client/1.0.2/firebase.js'></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script src="http://prezi.github.io/prezi-player/lib/PreziPlayer/prezi_player.js"></script> | |
<style> | |
body { | |
margin: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="prezi-player"></div> | |
<script> | |
$(function() { | |
var prezi_id = 'your-prezi-id'; //use prezi id | |
var player = new PreziPlayer('prezi-player', { | |
'preziId' : prezi_id, | |
controls: true, | |
width: $(window).width(), | |
height: $(window).height() | |
}); | |
player.on(PreziPlayer.EVENT_STATUS, function(event) { | |
if (event.value == PreziPlayer.STATUS_CONTENT_READY) { | |
player.play(5000) //slides changed 5 seconds | |
}; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment