Skip to content

Commit

Permalink
Add more BASE meta fields
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgk committed Sep 10, 2024
1 parent e72e594 commit cf38435
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/lib/bap_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,19 @@ const parseMetaLTVItem = (type, len, value) => {
const item = { type, name };
// For now, just parse the ones we know
switch (type) {
case BT_Meta.PreferredAudioContexts:
case BT_Meta.StreamingAudioContexts:
item.value = getIntAt(value, 0, 2);
break;
case BT_Meta.ProgramInfo:
case BT_Meta.Language:
const decoder = new TextDecoder();
item.value = decoder.decode(value);
break;
case BT_Meta.CCIDList:
// For now, just grab and store the complete byte array as is
item.value = Array.from(value);
break;
default:
item.value = "UNHANDLED";
break;
Expand Down

0 comments on commit cf38435

Please sign in to comment.