Flash adaptive streaming or.... i need help

what im looking to accomplish is one. a way where flash sniffs out the connection type of the visitor and then plays one of 2 videos on the server…a good quality one or a lower quality one.

is this even possible on flash yet? if so whats the general direction i need to start looking?
anyone has any ideas?

thanks and happy 4th holiday peeps