Answer the question
In order to leave comments, you need to log in
How to implement focus on the application?
Good afternoon,
Dano:
Interactive presentation in application format via webview. When you hit the next slide, an audio track with a speaker is turned on, on some slides there are previews of PDF documents with links to the documents themselves.
Find:
A way to start the audio track from the same place where the user followed the link in the PDF viewer when they return.
Solution:
1. Window.onFocus is deprecated ( https://learn.javascript.ru/window-focus)
2. Document.onmousemove won't work as it's a phone app
3. Your expert suggestions.
Answer the question
In order to leave comments, you need to log in
We catch a click, pause and write to localstorage (a timestamp from the id track), make the transition to pdf.
On return - check localstorage and if there is a pause for this audio file, read the parameters and resume playback from the pause point.
PS: Opening pdf - can be either in a new window or tab, or in the same one where the presentation was.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question