d290484f by David LaPalomento

Clear out tag info when the input file changes

Don't append to the tag info pane. Overwrite the innerHTML whenever one of the files change.
1 parent 1b2da15a
...@@ -137,7 +137,11 @@ ...@@ -137,7 +137,11 @@
137 i, 137 i,
138 pos; 138 pos;
139 139
140 // clear old tag info
141 vjsTags.innerHTML = '';
142
140 parser.parseSegmentBinaryData(new Uint8Array(reader.result)); 143 parser.parseSegmentBinaryData(new Uint8Array(reader.result));
144
141 // collect all the tags 145 // collect all the tags
142 while (parser.tagsAvailable()) { 146 while (parser.tagsAvailable()) {
143 tag = parser.getNextTag(); 147 tag = parser.getNextTag();
...@@ -177,6 +181,9 @@ ...@@ -177,6 +181,9 @@
177 dataSize, 181 dataSize,
178 li; 182 li;
179 183
184 // clear old tag info
185 workingTags.innerHTML = '';
186
180 // traverse the tags 187 // traverse the tags
181 i += 4; // previous tag size 188 i += 4; // previous tag size
182 while (i < bytes.byteLength) { 189 while (i < bytes.byteLength) {
...@@ -201,5 +208,29 @@ ...@@ -201,5 +208,29 @@
201 reader.readAsArrayBuffer(this.files[0]); 208 reader.readAsArrayBuffer(this.files[0]);
202 }, false); 209 }, false);
203 </script> 210 </script>
211 <script type="text/plain">
212 // map nal_unit_types to friendly names
213 console.log([
214 'unspecified',
215 'slice_layer_without_partitioning',
216 'slice_data_partition_a_layer',
217 'slice_data_partition_b_layer',
218 'slice_data_partition_c_layer',
219 'slice_layer_without_partitioning_idr',
220 'sei',
221 'seq_parameter_set',
222 'pic_parameter_set',
223 'access_unit_delimiter',
224 'end_of_seq',
225 'end_of_stream',
226 'filler',
227 'seq_parameter_set_ext',
228 'prefix_nal_unit',
229 'subset_seq_parameter_set',
230 'reserved',
231 'reserved',
232 'reserved'
233 ][nalUnitType]);
234 </script>
204 </body> 235 </body>
205 </html> 236 </html>
......