shaka-player 4.3.10 → 4.3.11

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.
@@ -6,8 +6,8 @@
6
6
 
7
7
  /**
8
8
  * @externs
9
- * @suppress {duplicate} To prevent compiler errors with the namespace
10
- * being declared both here and by goog.provide in the library.
9
+ * @suppress {constantProperty, duplicate} To prevent compiler errors with the
10
+ * namespace being declared both here and by goog.provide in the library.
11
11
  */
12
12
 
13
13
  /** @namespace */
@@ -1155,6 +1155,7 @@ shaka.hls.HlsParser = class {
1155
1155
  // and no video codec, so it should be audio.
1156
1156
  type = ContentType.AUDIO;
1157
1157
  shaka.log.debug('Guessing audio-only.');
1158
+ ignoreStream = res.audio.length > 0;
1158
1159
  } else if (!streamInfos.length && audioCodecs && videoCodecs) {
1159
1160
  // There are both audio and video codecs, so assume multiplexed content.
1160
1161
  // Note that the default used when CODECS is missing assumes multiple
package/lib/player.js CHANGED
@@ -7020,7 +7020,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
7020
7020
  * @define {string} A version number taken from git at compile time.
7021
7021
  * @export
7022
7022
  */
7023
- shaka.Player.version = 'v4.3.10-uncompiled';
7023
+ shaka.Player.version = 'v4.3.11-uncompiled';
7024
7024
 
7025
7025
  // Initialize the deprecation system using the version string we just set
7026
7026
  // on the player.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shaka-player",
3
3
  "description": "DASH/EME video player library",
4
- "version": "4.3.10",
4
+ "version": "4.3.11",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -4113,19 +4113,11 @@ describe('HlsParser', () => {
4113
4113
  expect(videoSegments2[2].endTime).toBe(10);
4114
4114
  });
4115
4115
 
4116
- // Issue #1875
4117
- it('ignores audio groups on audio-only content', async () => {
4118
- // NOTE: To reproduce the original issue accurately, the two audio playlist
4119
- // URIs must differ. When the issue occurred, the audio-only variant would
4120
- // be detected as a video stream and combined with the audio group, leading
4121
- // the player to buffer "video" that was really audio, resulting in
4122
- // audio-only playback to the exclusion of any other streams. Since the
4123
- // root cause of that was the mis-detection, this repro case does not need
4124
- // to include any audio+video variants.
4116
+ it('allow audio groups on audio-only content', async () => {
4125
4117
  const master = [
4126
4118
  '#EXTM3U\n',
4127
- '#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANG="en",URI="audio1"\n',
4128
- '#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANG="eo",URI="audio2"\n',
4119
+ '#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANGUAGE="en",URI="audio1"\n',
4120
+ '#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",LANGUAGE="eo",URI="audio2"\n',
4129
4121
  '#EXT-X-STREAM-INF:BANDWIDTH=200,CODECS="mp4a",AUDIO="aud"\n',
4130
4122
  'audio3\n',
4131
4123
  ].join('');
@@ -4143,7 +4135,14 @@ describe('HlsParser', () => {
4143
4135
  manifest.anyTimeline();
4144
4136
  manifest.addPartialVariant((variant) => {
4145
4137
  variant.bandwidth = 200;
4146
- variant.language = 'und';
4138
+ variant.language = 'en';
4139
+ variant.addPartialStream(ContentType.AUDIO, (stream) => {
4140
+ stream.mime('audio/mp4', 'mp4a');
4141
+ });
4142
+ });
4143
+ manifest.addPartialVariant((variant) => {
4144
+ variant.bandwidth = 200;
4145
+ variant.language = 'eo';
4147
4146
  variant.addPartialStream(ContentType.AUDIO, (stream) => {
4148
4147
  stream.mime('audio/mp4', 'mp4a');
4149
4148
  });
@@ -4161,7 +4160,7 @@ describe('HlsParser', () => {
4161
4160
 
4162
4161
  const actual = await parser.start('test:/master', playerInterface);
4163
4162
  await loadAllStreamsFor(actual);
4164
- expect(actual.variants.length).toBe(1);
4163
+ expect(actual.variants.length).toBe(2);
4165
4164
  expect(actual).toEqual(manifest);
4166
4165
  });
4167
4166