@editframe/elements 0.12.0-beta.19 → 0.12.0-beta.20
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/elements/EFVideo.js +10 -2
- package/package.json +2 -2
- package/src/elements/EFVideo.ts +13 -2
package/dist/elements/EFVideo.js
CHANGED
|
@@ -66,8 +66,16 @@ let EFVideo = class extends TWMixin(EFMedia) {
|
|
|
66
66
|
if (!(frame && ctx)) {
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (frame?.codedWidth && frame?.codedHeight) {
|
|
70
|
+
if (this.canvasElement.width !== frame.codedWidth || this.canvasElement.height !== frame.codedHeight) {
|
|
71
|
+
this.canvasElement.width = frame.codedWidth;
|
|
72
|
+
this.canvasElement.height = frame.codedHeight;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (frame.format === null) {
|
|
76
|
+
console.warn("Frame format is null", frame);
|
|
77
|
+
return seekToMs;
|
|
78
|
+
}
|
|
71
79
|
ctx.drawImage(
|
|
72
80
|
frame,
|
|
73
81
|
0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.12.0-beta.
|
|
3
|
+
"version": "0.12.0-beta.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"author": "",
|
|
22
22
|
"license": "UNLICENSED",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@editframe/assets": "0.12.0-beta.
|
|
24
|
+
"@editframe/assets": "0.12.0-beta.20",
|
|
25
25
|
"@lit/context": "^1.1.2",
|
|
26
26
|
"@lit/task": "^1.0.1",
|
|
27
27
|
"d3": "^7.9.0",
|
package/src/elements/EFVideo.ts
CHANGED
|
@@ -78,9 +78,20 @@ export class EFVideo extends TWMixin(EFMedia) {
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
if (frame?.codedWidth && frame?.codedHeight) {
|
|
82
|
+
if (
|
|
83
|
+
this.canvasElement.width !== frame.codedWidth ||
|
|
84
|
+
this.canvasElement.height !== frame.codedHeight
|
|
85
|
+
) {
|
|
86
|
+
this.canvasElement.width = frame.codedWidth;
|
|
87
|
+
this.canvasElement.height = frame.codedHeight;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
83
90
|
|
|
91
|
+
if (frame.format === null) {
|
|
92
|
+
console.warn("Frame format is null", frame);
|
|
93
|
+
return seekToMs;
|
|
94
|
+
}
|
|
84
95
|
ctx.drawImage(
|
|
85
96
|
frame,
|
|
86
97
|
0,
|