                             disIdx = i;
                             break;
                         case FLVTag.METADATA:
-                            metIdx = i;
+                            if(data.loaderType == HLSLoaderTypes.FRAGMENT_MAIN) {
+                                metIdxMain = i;
+                            } else {
+                                metIdxAltAudio = i;
+                            }
                             break;
                         case FLVTag.AAC_HEADER:
                             aacIdx = i;

            }
            // inject discontinuity/metadata/AVC header/AAC header if available
            if (disIdx != -1)  idx2Clone.push(disIdx);
            if (metIdx != -1)  idx2Clone.push(metIdx);
            if (aacIdx != -1)  idx2Clone.push(aacIdx);
            if (avcIdx != -1)  idx2Clone.push(avcIdx);


                if (max_pos >= _seek_position_requested) {
                    // inject enough tags to reach seek position
                    duration = _seek_position_requested + MAX_NETSTREAM_BUFFER_SIZE - min_min_pos;
                }
            }
            if (duration > 0) {
