@editframe/elements 0.9.0-beta.3 → 0.10.0-beta.3
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/src/elements/EFCaptions.js +2 -2
- package/dist/elements/src/elements/EFImage.js +2 -2
- package/dist/elements/src/elements/EFMedia.js +4 -4
- package/dist/elements/src/elements/EFSourceMixin.js +1 -1
- package/package.json +2 -2
- package/src/elements/EFCaptions.browsertest.ts +2 -2
- package/src/elements/EFCaptions.ts +2 -2
- package/src/elements/EFImage.browsertest.ts +2 -2
- package/src/elements/EFImage.ts +2 -2
- package/src/elements/EFMedia.browsertest.ts +4 -4
- package/src/elements/EFMedia.ts +4 -4
- package/src/elements/EFSourceMixin.ts +1 -1
|
@@ -95,9 +95,9 @@ let EFCaptions = class extends EFSourceMixin(
|
|
|
95
95
|
captionsPath() {
|
|
96
96
|
if (this.targetElement.assetId) {
|
|
97
97
|
if (EF_RENDERING()) {
|
|
98
|
-
return `editframe://api/
|
|
98
|
+
return `editframe://api/v1/caption_files/${this.targetElement.assetId}`;
|
|
99
99
|
}
|
|
100
|
-
return `https://editframe.dev/api/
|
|
100
|
+
return `https://editframe.dev/api/v1/caption_files/${this.targetElement.assetId}`;
|
|
101
101
|
}
|
|
102
102
|
const targetSrc = this.targetElement.src;
|
|
103
103
|
return `/@ef-captions/${targetSrc}`;
|
|
@@ -76,9 +76,9 @@ let EFImage = class extends EFSourceMixin(FetchMixin(LitElement), {
|
|
|
76
76
|
assetPath() {
|
|
77
77
|
if (this.assetId) {
|
|
78
78
|
if (EF_RENDERING()) {
|
|
79
|
-
return `editframe://api/
|
|
79
|
+
return `editframe://api/v1/image_files/${this.assetId}`;
|
|
80
80
|
}
|
|
81
|
-
return `https://editframe.dev/api/
|
|
81
|
+
return `https://editframe.dev/api/v1/image_files/${this.assetId}`;
|
|
82
82
|
}
|
|
83
83
|
return `/@ef-image/${this.src}`;
|
|
84
84
|
}
|
|
@@ -243,18 +243,18 @@ class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
243
243
|
fragmentIndexPath() {
|
|
244
244
|
if (this.assetId) {
|
|
245
245
|
if (EF_RENDERING()) {
|
|
246
|
-
return `editframe://api/
|
|
246
|
+
return `editframe://api/v1/isobmff_files/${this.assetId}/index`;
|
|
247
247
|
}
|
|
248
|
-
return `https://editframe.dev/api/
|
|
248
|
+
return `https://editframe.dev/api/v1/isobmff_files/${this.assetId}/index`;
|
|
249
249
|
}
|
|
250
250
|
return `/@ef-track-fragment-index/${this.src ?? ""}`;
|
|
251
251
|
}
|
|
252
252
|
fragmentTrackPath(trackId) {
|
|
253
253
|
if (this.assetId) {
|
|
254
254
|
if (EF_RENDERING()) {
|
|
255
|
-
return `editframe://api/
|
|
255
|
+
return `editframe://api/v1/isobmff_tracks/${this.assetId}/${trackId}`;
|
|
256
256
|
}
|
|
257
|
-
return `https://editframe.dev/api/
|
|
257
|
+
return `https://editframe.dev/api/v1/isobmff_tracks/${this.assetId}/${trackId}`;
|
|
258
258
|
}
|
|
259
259
|
return `/@ef-track/${this.src ?? ""}?trackId=${trackId}`;
|
|
260
260
|
}
|
|
@@ -38,7 +38,7 @@ function EFSourceMixin(superClass, options) {
|
|
|
38
38
|
`efHost not available for ${this}. Cannot generate production URL`
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
return `${this.efHost}/api/
|
|
41
|
+
return `${this.efHost}/api/v1/${options.assetType}/${this.md5SumLoader.value}`;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
__decorateClass([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "UNLICENSED",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@editframe/assets": "0.
|
|
23
|
+
"@editframe/assets": "0.10.0-beta.3",
|
|
24
24
|
"@lit/context": "^1.1.2",
|
|
25
25
|
"@lit/task": "^1.0.1",
|
|
26
26
|
"d3": "^7.9.0",
|
|
@@ -27,7 +27,7 @@ describe("EFCaptions", () => {
|
|
|
27
27
|
document.body.appendChild(captions);
|
|
28
28
|
workbench.appendChild(captions);
|
|
29
29
|
expect(captions.captionsPath()).toBe(
|
|
30
|
-
"editframe://api/
|
|
30
|
+
"editframe://api/v1/caption_files/550e8400-e29b-41d4-a716-446655440000:example.mp4",
|
|
31
31
|
);
|
|
32
32
|
});
|
|
33
33
|
});
|
|
@@ -43,7 +43,7 @@ describe("EFCaptions", () => {
|
|
|
43
43
|
captions.setAttribute("target", id);
|
|
44
44
|
document.body.appendChild(captions);
|
|
45
45
|
expect(captions.captionsPath()).toBe(
|
|
46
|
-
`https://editframe.dev/api/
|
|
46
|
+
`https://editframe.dev/api/v1/caption_files/${id}:example.mp4`,
|
|
47
47
|
);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -91,9 +91,9 @@ export class EFCaptions extends EFSourceMixin(
|
|
|
91
91
|
captionsPath() {
|
|
92
92
|
if (this.targetElement.assetId) {
|
|
93
93
|
if (EF_RENDERING()) {
|
|
94
|
-
return `editframe://api/
|
|
94
|
+
return `editframe://api/v1/caption_files/${this.targetElement.assetId}`;
|
|
95
95
|
}
|
|
96
|
-
return `https://editframe.dev/api/
|
|
96
|
+
return `https://editframe.dev/api/v1/caption_files/${this.targetElement.assetId}`;
|
|
97
97
|
}
|
|
98
98
|
const targetSrc = this.targetElement.src;
|
|
99
99
|
return `/@ef-captions/${targetSrc}`;
|
|
@@ -19,7 +19,7 @@ describe("EFImage", () => {
|
|
|
19
19
|
workbench.appendChild(element);
|
|
20
20
|
element.assetId = "550e8400-e29b-41d4-a716-446655440000:example.jpg";
|
|
21
21
|
expect(element.assetPath()).toBe(
|
|
22
|
-
"editframe://api/
|
|
22
|
+
"editframe://api/v1/image_files/550e8400-e29b-41d4-a716-446655440000:example.jpg",
|
|
23
23
|
);
|
|
24
24
|
});
|
|
25
25
|
});
|
|
@@ -41,7 +41,7 @@ describe("EFImage", () => {
|
|
|
41
41
|
const image = document.createElement("ef-image");
|
|
42
42
|
image.setAttribute("asset-id", `${id}:example.jpg`);
|
|
43
43
|
expect(image.assetPath()).toBe(
|
|
44
|
-
`https://editframe.dev/api/
|
|
44
|
+
`https://editframe.dev/api/v1/image_files/${id}:example.jpg`,
|
|
45
45
|
);
|
|
46
46
|
});
|
|
47
47
|
});
|
package/src/elements/EFImage.ts
CHANGED
|
@@ -52,9 +52,9 @@ export class EFImage extends EFSourceMixin(FetchMixin(LitElement), {
|
|
|
52
52
|
assetPath() {
|
|
53
53
|
if (this.assetId) {
|
|
54
54
|
if (EF_RENDERING()) {
|
|
55
|
-
return `editframe://api/
|
|
55
|
+
return `editframe://api/v1/image_files/${this.assetId}`;
|
|
56
56
|
}
|
|
57
|
-
return `https://editframe.dev/api/
|
|
57
|
+
return `https://editframe.dev/api/v1/image_files/${this.assetId}`;
|
|
58
58
|
}
|
|
59
59
|
return `/@ef-image/${this.src}`;
|
|
60
60
|
}
|
|
@@ -35,7 +35,7 @@ describe("EFMedia", () => {
|
|
|
35
35
|
workbench.appendChild(element);
|
|
36
36
|
element.assetId = "550e8400-e29b-41d4-a716-446655440000:example.mp4";
|
|
37
37
|
expect(element.fragmentIndexPath()).toBe(
|
|
38
|
-
"editframe://api/
|
|
38
|
+
"editframe://api/v1/isobmff_files/550e8400-e29b-41d4-a716-446655440000:example.mp4/index",
|
|
39
39
|
);
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ describe("EFMedia", () => {
|
|
|
45
45
|
workbench.appendChild(element);
|
|
46
46
|
element.assetId = "550e8400-e29b-41d4-a716-446655440000:example.mp4";
|
|
47
47
|
expect(element.fragmentTrackPath("1")).toBe(
|
|
48
|
-
"editframe://api/
|
|
48
|
+
"editframe://api/v1/isobmff_tracks/550e8400-e29b-41d4-a716-446655440000:example.mp4/1",
|
|
49
49
|
);
|
|
50
50
|
});
|
|
51
51
|
});
|
|
@@ -67,7 +67,7 @@ describe("EFMedia", () => {
|
|
|
67
67
|
const element = document.createElement("test-media");
|
|
68
68
|
element.setAttribute("asset-id", `${id}:example.mp4`);
|
|
69
69
|
expect(element.fragmentIndexPath()).toBe(
|
|
70
|
-
`https://editframe.dev/api/
|
|
70
|
+
`https://editframe.dev/api/v1/isobmff_files/${id}:example.mp4/index`,
|
|
71
71
|
);
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -76,7 +76,7 @@ describe("EFMedia", () => {
|
|
|
76
76
|
const element = document.createElement("test-media");
|
|
77
77
|
element.setAttribute("asset-id", `${id}:example.mp4`);
|
|
78
78
|
expect(element.fragmentTrackPath("1")).toBe(
|
|
79
|
-
`https://editframe.dev/api/
|
|
79
|
+
`https://editframe.dev/api/v1/isobmff_tracks/${id}:example.mp4/1`,
|
|
80
80
|
);
|
|
81
81
|
});
|
|
82
82
|
});
|
package/src/elements/EFMedia.ts
CHANGED
|
@@ -72,9 +72,9 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
72
72
|
fragmentIndexPath() {
|
|
73
73
|
if (this.assetId) {
|
|
74
74
|
if (EF_RENDERING()) {
|
|
75
|
-
return `editframe://api/
|
|
75
|
+
return `editframe://api/v1/isobmff_files/${this.assetId}/index`;
|
|
76
76
|
}
|
|
77
|
-
return `https://editframe.dev/api/
|
|
77
|
+
return `https://editframe.dev/api/v1/isobmff_files/${this.assetId}/index`;
|
|
78
78
|
}
|
|
79
79
|
return `/@ef-track-fragment-index/${this.src ?? ""}`;
|
|
80
80
|
}
|
|
@@ -82,9 +82,9 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
82
82
|
fragmentTrackPath(trackId: string) {
|
|
83
83
|
if (this.assetId) {
|
|
84
84
|
if (EF_RENDERING()) {
|
|
85
|
-
return `editframe://api/
|
|
85
|
+
return `editframe://api/v1/isobmff_tracks/${this.assetId}/${trackId}`;
|
|
86
86
|
}
|
|
87
|
-
return `https://editframe.dev/api/
|
|
87
|
+
return `https://editframe.dev/api/v1/isobmff_tracks/${this.assetId}/${trackId}`;
|
|
88
88
|
}
|
|
89
89
|
// trackId is only specified as a query in the @ef-track url shape
|
|
90
90
|
// this is because that system doesn't have a full url matching system.
|
|
@@ -39,7 +39,7 @@ export function EFSourceMixin<T extends Constructor<LitElement>>(
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
return `${this.efHost}/api/
|
|
42
|
+
return `${this.efHost}/api/v1/${options.assetType}/${this.md5SumLoader.value}`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
md5SumLoader = new Task(this, {
|