I have an HTML article with some video content, developed only for iPad. I'm running into a problem when changing articles. We have a full screen video that plays through and some javascript bound to the video's 'ended' event to hide the video and load new content. The problem is, if the user switches articles (swipes left or right) during the video, the video is paused and stuck on the screen.
What I'm looking for is an event that triggers when the user enters or leaves an HTML article that was already loaded. Are there any such events? Anything I can listen for? I need a way to detect that the user has returned to the article so we can skip the video feature and show the remaining content.
Thanks for any help!
For future reference, I found the solution:
The little-publicized, Adobe-specific event handlers onAppear() and onDisappear() can be used to detect when the reader swipes in or out of your HTML article. In my case, I used a window.onAppear() function to start playing the video again when the reader returns to the article.
These functions sound like they are very usefull in my line of work but I can't get it to work.. When I execute this javascript on page 3:
window.onAppear(alert("appeared!"));
window.onDisappear(alert("disappeared!"));
The alerts both come when opening the folio (on the first page)..
Is there some kind of API where I can read more about these wonderful Adobe javascript implementations?
North America
Europe, Middle East and Africa
Asia Pacific