Please Help!

I am working with Camera class in flash with red5 server… i need a script to detect camera. if user disconnect camera i want to give him a warning.