hls.js 1.6.0-beta.2.0.canary.10867 → 1.6.0-beta.2.0.canary.10871

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
@@ -115,7 +115,7 @@
115
115
  "karma-rollup-preprocessor": "github:jlmakes/karma-rollup-preprocessor#7a7268d91149307b3cf2888ee4e65ccd079955a3",
116
116
  "karma-sinon-chai": "2.0.2",
117
117
  "karma-sourcemap-loader": "0.4.0",
118
- "lint-staged": "15.2.11",
118
+ "lint-staged": "15.3.0",
119
119
  "markdown-styles": "3.2.0",
120
120
  "micromatch": "4.0.8",
121
121
  "mocha": "10.8.2",
@@ -134,5 +134,5 @@
134
134
  "url-toolkit": "2.2.5",
135
135
  "wrangler": "3.99.0"
136
136
  },
137
- "version": "1.6.0-beta.2.0.canary.10867"
137
+ "version": "1.6.0-beta.2.0.canary.10871"
138
138
  }
@@ -122,8 +122,10 @@ class HevcVideoParser extends BaseVideoParser {
122
122
  case 32:
123
123
  push = true;
124
124
  if (!track.vps) {
125
- const config = this.readVPS(unit.data);
126
- track.params = { ...config };
125
+ if (typeof track.params !== 'object') {
126
+ track.params = {};
127
+ }
128
+ track.params = Object.assign(track.params, this.readVPS(unit.data));
127
129
  this.initVPS = unit.data;
128
130
  }
129
131
  track.vps = [unit.data];
@@ -133,31 +135,35 @@ class HevcVideoParser extends BaseVideoParser {
133
135
  case 33:
134
136
  push = true;
135
137
  spsfound = true;
136
- if (typeof track.params === 'object') {
137
- if (
138
- track.vps !== undefined &&
139
- track.vps[0] !== this.initVPS &&
140
- track.sps !== undefined &&
141
- !this.matchSPS(track.sps[0], unit.data)
142
- ) {
143
- this.initVPS = track.vps[0];
144
- track.sps = track.pps = undefined;
145
- }
146
- if (!track.sps) {
147
- const config = this.readSPS(unit.data);
148
- track.width = config.width;
149
- track.height = config.height;
150
- track.pixelRatio = config.pixelRatio;
151
- track.codec = config.codecString;
152
- track.sps = [];
153
- for (const prop in config.params) {
154
- track.params[prop] = config.params[prop];
155
- }
138
+ if (
139
+ track.vps !== undefined &&
140
+ track.vps[0] !== this.initVPS &&
141
+ track.sps !== undefined &&
142
+ !this.matchSPS(track.sps[0], unit.data)
143
+ ) {
144
+ this.initVPS = track.vps[0];
145
+ track.sps = track.pps = undefined;
146
+ }
147
+ if (!track.sps) {
148
+ const config = this.readSPS(unit.data);
149
+ track.width = config.width;
150
+ track.height = config.height;
151
+ track.pixelRatio = config.pixelRatio;
152
+ track.codec = config.codecString;
153
+ track.sps = [];
154
+ if (typeof track.params !== 'object') {
155
+ track.params = {};
156
156
  }
157
- if (track.vps !== undefined && track.vps[0] === this.initVPS) {
158
- track.sps.push(unit.data);
157
+ for (const prop in config.params) {
158
+ track.params[prop] = config.params[prop];
159
159
  }
160
160
  }
161
+ if (
162
+ (!track.vps && !track.sps.length) ||
163
+ (track.vps && track.vps[0] === this.initVPS)
164
+ ) {
165
+ track.sps.push(unit.data);
166
+ }
161
167
  if (!VideoSample) {
162
168
  VideoSample = this.VideoSample = this.createVideoSample(
163
169
  true,
@@ -179,7 +185,10 @@ class HevcVideoParser extends BaseVideoParser {
179
185
  track.params[prop] = config[prop];
180
186
  }
181
187
  }
182
- if (track.vps !== undefined && track.vps[0] === this.initVPS) {
188
+ if (
189
+ (!track.vps && !track.pps.length) ||
190
+ (track.vps && track.vps[0] === this.initVPS)
191
+ ) {
183
192
  track.pps.push(unit.data);
184
193
  }
185
194
  }