         public static const ENDLIST : String = '#EXT-X-ENDLIST';
         /** Tag that provides info related to alternative audio tracks */
         public static const ALTERNATE_AUDIO : String = '#EXT-X-MEDIA:TYPE=AUDIO,';
+        /** Tag that provides info related to alternative rendition */
+        private static const MEDIA : String = '#EXT-X-MEDIA:';
         /** Tag that provides the sequence number. **/
         private static const SEQNUM : String = '#EXT-X-MEDIA-SEQUENCE:';
         /** Tag that provides the target duration for each segment. **/

        }

        /** Extract fragments from playlist data. **/
        public static function getFragments(data : String, base : String , level : int) : Vector.<Fragment> {
            var fragments : Vector.<Fragment> = new Vector.<Fragment>();
            var lines : Array = data.split("\n");
            // fragment seqnum

            var i : int = 0;
            while (i < lines.length) {
                var line : String = lines[i++];
                if (line.indexOf(MEDIA) == 0) {
                    var params : Object = _parseAlternateRendition(line);

                    // #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 1",AUTOSELECT=YES,DEFAULT=YES
                    // #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 2",AUTOSELECT=NO,DEFAULT=NO,URI="alternate_audio_aac_sinewave/prog_index.m3u8"
                    // #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="captions.m3u8"

                    var uri : String = params['URI'];
                    if (uri) {
                        uri = _extractURL(uri, base);
                    }
                    if (params['TYPE'] == 'AUDIO') {
                        var alternate_audio : AltAudioTrack = new AltAudioTrack(params['GROUP-ID'], params['LANGUAGE'], params['NAME'], params['AUTOSELECT'] == 'YES', params['DEFAULT'] == 'YES', uri);
                        altAudioTracks.push(alternate_audio);
                    }
                }
            }
            return altAudioTracks;
        };

        private static const RENDITION_STATE_READKEY : Number = 1;
        private static const RENDITION_STATE_READVALUESTART : Number = 2;
        private static const RENDITION_STATE_READSIMPLEVALUE : Number = 3;
        private static const RENDITION_STATE_READQUOTEDVALUE : Number = 4;
        private static const STATE_READQUOTEDVALUE_END : Number = 5;

        private static function _parseAlternateRendition(line : String) : Object {
            var variables : Object = new Object();
            var state : Number = RENDITION_STATE_READKEY;
            var pos : Number = 0;
            var c : String;
            var key : String = "";
            var value : String = "";
            line = line.substr(MEDIA.length);

            while (pos < line.length) {
                c = line.charAt(pos);
                pos++;
                switch (state) {
                    case RENDITION_STATE_READKEY:
                        if (c == '=') {
                            state = RENDITION_STATE_READVALUESTART;
                        } else {
                            key += c;
                        }
                        break;
                    case RENDITION_STATE_READVALUESTART:
                        if (c == '"') {
                            state = RENDITION_STATE_READQUOTEDVALUE;
                        } else {
                            value += c;
                            state = RENDITION_STATE_READSIMPLEVALUE;
                        }
                        break;
                    case RENDITION_STATE_READSIMPLEVALUE:
                        if (c == ",") {
                            variables[key] = value;
                            key = "";
                            value = "";
                            state = RENDITION_STATE_READKEY;
                        } else {
                            value += c;
                        }
                        break;
                    case RENDITION_STATE_READQUOTEDVALUE:
                        if (c == '"') {
                            state = STATE_READQUOTEDVALUE_END;
                        } else {
                            value += c;
                        }
                        break;
                    case STATE_READQUOTEDVALUE_END:
                        if (c == ",") {
                            variables[key] = value;
                            key = "";
                            value = "";
                            state = RENDITION_STATE_READKEY;
                        }
                        break;
                }
            }

            if (key) {
                variables[key] = value;
            }

            return variables;
        }

        /** Extract whether the stream is live or ondemand. **/
        public static function hasEndlist(data : String) : Boolean {
