PDA

View Full Version : AS bandwidth detector/diverter?



will-s
February 23rd, 2007, 07:03 PM
I'm Sorenson Squeezing my basic FLVs to a total data rate of 306 Kbps and then uploading them to a streaming server, to good effect.

Recently though, a friend with DSL couldn't get one to play. His bandwidth tested at 294 Kbps. I made him a version with a total data rate of 100 and that ran for him.

So, I'm thinking of putting up two versions of every FLV--a 306 and a 100. Can I actionscript a client-side detector that would automatically divert a viewer to the 100 if they have dial-up or a real lame DSL?

Breen
February 25th, 2007, 01:30 PM
You can only approximate the current bandwidth, which of course doesn't garuantee that bandwidth for longer than the test lasts.

Create an image file of between 50 and 100 kb, and download that file twice a row, counting (with a timer) how long that download takes. With the set size (in bytes) of the file, and the number of milliseconds is took to download, you can approximate the users current bandwidth, and make the choice for the user.

**edit, don't forget,
Filesize calculations:
- on disc -> 1kb = 1024b
- datatransfer -> 1kb = 1000b

will-s
February 27th, 2007, 03:51 PM
Hi, thanks for this.

I got a bandwidth detector from this link:
http://www.sonify.org/home/feature/remixology/019_bandwidthdetection/

If you go down to the bottom of the first page, you can click on his example and get a Kbps number.

I've run this many times on my DSL and have gotten numbers that range from 800 to 3,000. I'm wondering what good such a wide range of numbers can be?

None the less I downloaded his basic code and got it to work. But when I pasted in his "redirect" addendum code, it failed. It gives a Kbps of zero and doesn't redirect; I will continue to noodle with it and report any advances.

tonni
February 27th, 2007, 05:48 PM
http://betriebsraum.de
Downloads
Bandwidtdetector

is a decent one.........