Course Presentation - Switching slides from within an embedded iframe

pheraph's picture


I am currently evaluating if a Course Presentation could be used for a simple point and click adventure (with Active Surface enabled). To give me more flexibility I successfully added an iframe to a slide and loaded a small minigame. Now I am struggling to switch to a different slide from within the iframe's minigame to continue the game. I tried to call jumpToSlide(), but it isn't working because of lots of undefined values:


Any idea how I can uses jumpToSlide() to switch to a given slide?


Content types: 
fnoks's picture

You would need to get a reference to the CoursePresentation, you can´t invoke a function on the prototype object. The instance is available through the H5P.instances variable. I.e, you could do something like:


This code has to be loaded/run inside the H5P iframe.