red5 client code initial import (copy from red5 samples with small modifications)