but it always return 'visible' on first run even if the page is currently not the active one, but when you swipe to next page it change to 'hidden' and 'Visible'.
how can I find the state on the first run, so I can decide to play video automatically or not ?
Hello,
I'm struggling to find if the page is visible to user or hidden to start/pause video that auto-play automatically.
I used page visibility API: http://davidwalsh.name/page-visibility
but it always return 'visible' on first run even if the page is currently not the active one, but when you swipe to next page it change to 'hidden' and 'Visible'.
how can I find the state on the first run, so I can decide to play video automatically or not ?
Thanks