single-file-core 1.0.41 → 1.0.42

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -674,7 +674,7 @@ class Processor {
674
674
  const attributeValue = element.getAttribute(util.POSTER_ATTRIBUTE_NAME);
675
675
  if (attributeValue) {
676
676
  const posterURL = this.options.posters[Number(attributeValue)];
677
- if (!videoElement.poster && posterURL) {
677
+ if (!videoElement.getAttribute("poster") && posterURL) {
678
678
  videoElement.setAttribute("poster", posterURL);
679
679
  }
680
680
  }
@@ -300,7 +300,7 @@ function getResourcesInfo(win, doc, element, options, data, elementHidden, compu
300
300
  });
301
301
  element.setAttribute(VIDEO_ATTRIBUTE_NAME, data.videos.length - 1);
302
302
  }
303
- if (!element.poster) {
303
+ if (!element.getAttribute("poster")) {
304
304
  const canvasElement = doc.createElement("canvas");
305
305
  const context = canvasElement.getContext("2d");
306
306
  canvasElement.width = element.clientWidth;