Question

I'm playing around with streaming live video to the Flash Player. The problem is, it seems (from my logs) that many users will open a live video feed and then just leave it open all day, whether or not they are actually watching it.

As you can imagine, this is a horrendous waste of bandwidth. So I would like a way to determine if the user is actively watching the feed, and if not, close it. The window containing the Flash component should at least have to be the active window.

Can this be done? What solutions can you think of?

Thanks!

Was it helpful?

Solution

Your problem isn't really flash-related: you should use javascript to fire an instruction to your flash app to kill the stream when the embedding window has lost focus.

You can display a message in the player's viewport to the effect that the stream has been paused: if the user wants to resume playback they can simply hit play again.

OTHER TIPS

I'd also start the player paused and only start once the window recieves focus - this means anyone randomly opening lots of tabs doesn't start the movie playing until they get to the tab with the video - It's nice for the user and also saves your bandwidth.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top