@give-tech/ec-player 0.0.1-beta.54 → 0.0.1-beta.56

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/dist/index.js CHANGED
@@ -2613,20 +2613,12 @@ class HLSPlayer extends BasePlayer {
2613
2613
  try {
2614
2614
  response = await fetch(url, { signal: this.abortController?.signal });
2615
2615
  } catch (error) {
2616
- if (error.name === "AbortError") {
2617
- console.log("[HLSPlayer] Parse playlist aborted");
2618
- return { isMaster: true, isFMP4: false, segments: [], fmp4Segments: [], variants: 0 };
2619
- }
2620
2616
  throw error;
2621
2617
  }
2622
2618
  let content;
2623
2619
  try {
2624
2620
  content = await response.text();
2625
2621
  } catch (error) {
2626
- if (error.name === "AbortError") {
2627
- console.log("[HLSPlayer] Read playlist body aborted");
2628
- return { isMaster: true, isFMP4: false, segments: [], fmp4Segments: [], variants: 0 };
2629
- }
2630
2622
  throw error;
2631
2623
  }
2632
2624
  const lines = content.split("\n");
@@ -4431,7 +4423,7 @@ class Canvas2DRenderer {
4431
4423
  render(frame) {
4432
4424
  if (!frame || !frame.data) return;
4433
4425
  const { width, height, data } = frame;
4434
- if (this.canvas.width !== width || this.canvas.height !== height) {
4426
+ if (this.canvas.width !== width || this.canvas.height !== height || !this.cachedImageData) {
4435
4427
  this.canvas.width = width;
4436
4428
  this.canvas.height = height;
4437
4429
  this.cachedImageData = this.ctx.createImageData(width, height);