Determine when the Flash component is not displayed

I play with live streaming video in Flash Player. The problem is (from my magazines) that many users will open a live video feed and then just leave it open all day, regardless of whether it actually watches it.

As you can imagine, this is a terrible waste of bandwidth. Therefore, I would like to know if the user is actively viewing the feed, and if not, close it. The window containing the Flash component should at least be the active window.

Can this be done? What solutions can you come up with?

Thanks!

+4
source share
2 answers

Your problem is not flash related: you must use javascript to run the instructions for your flash application to kill the thread when the embed window has lost focus.

You can display a message in the player’s viewing window that the stream has been paused: if the user wants to resume playback, he can simply press play again.

+7
source

I also started the player and stopped only after the window got focus. This means that any accidental opening of multiple tabs does not start movie playback until they get to the video tab. It is pleasant for the user and also saves your bandwidth.

0
source

All Articles