     }
 }
 
+class DiscontinuityTracker
+{
+    private var _disc: Boolean = true;
+    private var _fragCont: Number = -1;
+
+    public function get discontinuity(): Boolean
+    {
+        return _disc;
+    }
+
+    public function set fragmentContinuity(fragCont: Number): void
+    {
+        if (_fragCont !== -1)
+            _disc = fragCont != _fragCont;
+	_fragCont = fragCont;
+    }
+
+    public function set discontinuity(disc: Boolean): void
+    {
+        _disc = disc;
+    }
+}
+

	_onerror = onerror;
	_levels = levels;
	_streamBuffer = streamBuffer;
	_handleParsingError = handleParsingError;
    }


    private var _hls: HLS;
    private var _levels: Vector.<Level>;
    private var _streamBuffer: StreamBuffer;
    private var _discTracker: DiscontinuityTracker;
    private var _handleParsingError: Function;

    public function FragScheduler(audioTrackController: AudioTrackController, hls: HLS, levels: Vector.<Level>, streamBuffer: StreamBuffer, discTracker: DiscontinuityTracker, oncomplete: Function, onerror: Function,
        handleParsingError: Function)
    {
        _audioTrackController = audioTrackController;
