Skip to content

Instantly share code, notes, and snippets.

@harishvc
Created February 6, 2015 02:45
Show Gist options
  • Save harishvc/44ef94d4aa85d18d1478 to your computer and use it in GitHub Desktop.
Save harishvc/44ef94d4aa85d18d1478 to your computer and use it in GitHub Desktop.
Autoplay Prezi Slides
<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