hls.js 1.5.8-0.canary.10164 → 1.5.8-0.canary.10166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -130,5 +130,5 @@
130
130
  "url-toolkit": "2.2.5",
131
131
  "wrangler": "3.45.0"
132
132
  },
133
- "version": "1.5.8-0.canary.10164"
133
+ "version": "1.5.8-0.canary.10166"
134
134
  }
@@ -1060,8 +1060,11 @@ export default class BufferController extends Logger implements ComponentAPI {
1060
1060
  `source buffer exists for track ${trackName}, however track does not`,
1061
1061
  );
1062
1062
  }
1063
- // use levelCodec as first priority
1064
- let codec = track.levelCodec || track.codec;
1063
+ // use levelCodec as first priority unless it contains multiple comma-separated codec values
1064
+ let codec =
1065
+ track.levelCodec?.indexOf(',') === -1
1066
+ ? track.levelCodec
1067
+ : track.codec;
1065
1068
  if (codec) {
1066
1069
  if (trackName.slice(0, 5) === 'audio') {
1067
1070
  codec = getCodecCompatibleName(codec, this.appendSource);
@@ -201,7 +201,7 @@ export function pickMostCompleteCodecName(
201
201
  if (parsedCodec && parsedCodec !== 'mp4a') {
202
202
  return parsedCodec;
203
203
  }
204
- return levelCodec;
204
+ return levelCodec ? levelCodec.split(',')[0] : levelCodec;
205
205
  }
206
206
 
207
207
  export function convertAVC1ToAVCOTI(codec: string) {
@@ -269,12 +269,15 @@ export function getCodecTiers(
269
269
  tier.fragmentError += level.fragmentError;
270
270
  tier.videoRanges[level.videoRange] =
271
271
  (tier.videoRanges[level.videoRange] || 0) + 1;
272
- if (audioGroups) {
272
+ if (__USE_ALT_AUDIO__ && audioGroups) {
273
273
  audioGroups.forEach((audioGroupId) => {
274
274
  if (!audioGroupId) {
275
275
  return;
276
276
  }
277
277
  const audioGroup = audioTracksByGroup.groups[audioGroupId];
278
+ if (!audioGroup) {
279
+ return;
280
+ }
278
281
  // Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
279
282
  tier.hasDefaultAudio =
280
283
  tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio