# Switching between Hi/Lo bandwidth video

**URL:** <https://forum.kirupa.com/t/switching-between-hi-lo-bandwidth-video/284535>\
**Category:** flash\
**Created:** [March 19, 2009, 11:43pm UTC](https://forum.kirupa.com/t/switching-between-hi-lo-bandwidth-video/284535 "2009-03-19T23:43:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [March 19, 2009, 11:43pm UTC](https://forum.kirupa.com/t/switching-between-hi-lo-bandwidth-video/284535/1 "2009-03-19T23:43:57Z")

</div>

I have a 2 hour long show that users will view online. I have a high bandwidth version and a low bandwidth version. I noticed when switching between the high and low bitrates, it shows the first half second or so of the newly loaded FLV and then skips to the time they were at. Anybody know what would cause that? Here is my function that toggles quality:

```auto

function toggleQuality():void
{
	var currentTime:Number = vid.playheadTime;
	if (currentQuality == "low")
	{
		trace("switching to high");
		qualityBtn.txt.text = "Std-Res";
		vid.stop();
		currentQuality = "high";
		vid.source = p._high;
		addCuePoints();
		vid.bufferTime = 3;
		vid.playheadTime = currentTime;
	}
	else
	{
		trace("switching to low");
		qualityBtn.txt.text = "Hi-Res";
		vid.stop();
		currentQuality = "low";
		vid.source = p._low;
		addCuePoints();
		vid.bufferTime = 3;
		vid.playheadTime = currentTime;
	}
}

```
