appscms-tools-theme 5.1.8 → 5.2.0
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.
- checksums.yaml +4 -4
- data/_data/.DS_Store +0 -0
- data/_data/aitools/en/ai-article-writer.json +184 -0
- data/_data/aitools/en/all-in-one-social-post.json +217 -0
- data/_data/aitools/en/amazon-product-bullet-points-generator.json +224 -0
- data/_data/aitools/en/amazon-product-description-generator.json +237 -0
- data/_data/aitools/en/blog-conclusion-generator.json +253 -0
- data/_data/aitools/en/blog-content-calendar.json +232 -0
- data/_data/aitools/en/blog-introduction-generator.json +246 -0
- data/_data/aitools/en/blog-outline-generator.json +232 -0
- data/_data/aitools/en/blog-section-generator.json +253 -0
- data/_data/aitools/en/blog-title-generator.json +232 -0
- data/_data/aitools/en/blog-topic-ideas.json +232 -0
- data/_data/aitools/en/brand-name-generator.json +215 -0
- data/_data/aitools/en/caption-generator.json +271 -0
- data/_data/aitools/en/engagement-post-generator.json +251 -0
- data/_data/aitools/en/facebook-post.json +232 -0
- data/_data/aitools/en/hidden-fact-finder.json +232 -0
- data/_data/aitools/en/human-written-blog-post.json +232 -0
- data/_data/aitools/en/instagram-bio-generator.json +246 -0
- data/_data/aitools/en/instagram-caption.json +232 -0
- data/_data/aitools/en/instagram-carousel.json +250 -0
- data/_data/aitools/en/instagram-hashtag-generator.json +246 -0
- data/_data/aitools/en/instagram-name-generator.json +239 -0
- data/_data/aitools/en/instagram-threads-generator.json +239 -0
- data/_data/aitools/en/interactive-content-creator.json +252 -0
- data/_data/aitools/en/linkedin-hashtag-generator.json +239 -0
- data/_data/aitools/en/linkedin-post.json +232 -0
- data/_data/aitools/en/motivational-posts.json +239 -0
- data/_data/aitools/en/pinterest-pin.json +217 -0
- data/_data/aitools/en/platform-specific-content-generator.json +246 -0
- data/_data/aitools/en/product-description.json +222 -0
- data/_data/aitools/en/quick-article-writer.json +253 -0
- data/_data/aitools/en/replies-for-facebook.json +239 -0
- data/_data/aitools/en/replies-for-instagram.json +239 -0
- data/_data/aitools/en/replies-for-linkedin.json +239 -0
- data/_data/aitools/en/replies-for-twitter.json +239 -0
- data/_data/aitools/en/rewrite-article-with-keywords.json +246 -0
- data/_data/aitools/en/script-for-instagram-reel.json +246 -0
- data/_data/aitools/en/script-for-tiktok-video.json +246 -0
- data/_data/aitools/en/seo-optimized-blog-post.json +239 -0
- data/_data/aitools/en/snapchat-caption-maker.json +245 -0
- data/_data/aitools/en/social-media-bio-creator.json +274 -0
- data/_data/aitools/en/social-media-bio-generator.json +246 -0
- data/_data/aitools/en/social-media-calendar.json +250 -0
- data/_data/aitools/en/tiktok-caption.json +232 -0
- data/_data/aitools/en/tiktok-username-generator.json +239 -0
- data/_data/aitools/en/twitter-poll-generator.json +250 -0
- data/_data/aitools/en/twitter-post.json +272 -0
- data/_data/contenttool/en/features.json +217 -10
- data/_includes/.DS_Store +0 -0
- data/_includes/appscms/.DS_Store +0 -0
- data/_includes/appscms/customblog/pageRelatedPosts.html +1 -1
- data/_layouts/appscms-feature.html +1 -1
- data/_layouts/content-tool-ai copy 2.html +6611 -0
- data/_layouts/content-tool-ai.html +305 -44
- data/assets/.DS_Store +0 -0
- data/assets/css/content-tool-ai.css +815 -11
- metadata +50 -67
- data/assets/js/.DS_Store +0 -0
- data/assets/js/TopScroll.js +0 -8
- data/assets/js/adBlocker.js +0 -68
- data/assets/js/ads.js +0 -8
- data/assets/js/append-div.js +0 -10
- data/assets/js/appscms-infographics.js +0 -0
- data/assets/js/appscms-login.js +0 -447
- data/assets/js/appscms-search-home1.js +0 -136
- data/assets/js/appscms-search.js +0 -133
- data/assets/js/appscms-theme.js +0 -459
- data/assets/js/batch.js +0 -219
- data/assets/js/blog-topic-ideas.js +0 -57
- data/assets/js/calculator-tooltip.js +0 -3
- data/assets/js/devtools.js +0 -82
- data/assets/js/face-api.js +0 -38064
- data/assets/js/face-detection.js +0 -303
- data/assets/js/faceSystem.js +0 -0
- data/assets/js/featureResult.js +0 -48
- data/assets/js/frame.js +0 -264
- data/assets/js/googledrive.js +0 -158
- data/assets/js/homeResult.js +0 -37
- data/assets/js/human-written-blog-post.js +0 -57
- data/assets/js/instagram-caption.js +0 -57
- data/assets/js/instagram-hashtag-generator.js +0 -10
- data/assets/js/instagram-name-generator.js +0 -61
- data/assets/js/manifest.json +0 -17
- data/assets/js/models/age_gender_model-shard1 +0 -0
- data/assets/js/models/age_gender_model-weights_manifest.json +0 -1
- data/assets/js/models/face_expression_model-shard1 +0 -0
- data/assets/js/models/face_expression_model-weights_manifest.json +0 -1
- data/assets/js/models/face_landmark_68_model-shard1 +0 -0
- data/assets/js/models/face_landmark_68_model-weights_manifest.json +0 -1
- data/assets/js/models/face_landmark_68_tiny_model-shard1 +0 -0
- data/assets/js/models/face_landmark_68_tiny_model-weights_manifest.json +0 -1
- data/assets/js/models/face_recognition_model-shard1 +0 -0
- data/assets/js/models/face_recognition_model-shard2 +0 -6
- data/assets/js/models/face_recognition_model-weights_manifest.json +0 -1
- data/assets/js/models/mtcnn_model-shard1 +0 -0
- data/assets/js/models/mtcnn_model-weights_manifest.json +0 -1
- data/assets/js/models/ssd_mobilenetv1_model-shard1 +0 -0
- data/assets/js/models/ssd_mobilenetv1_model-shard2 +8 -137
- data/assets/js/models/ssd_mobilenetv1_model-weights_manifest.json +0 -1
- data/assets/js/models/tiny_face_detector_model-shard1 +0 -0
- data/assets/js/models/tiny_face_detector_model-weights_manifest.json +0 -1
- data/assets/js/multiselect.js +0 -185
- data/assets/js/partytown/debug/partytown-atomics.js +0 -929
- data/assets/js/partytown/debug/partytown-media.js +0 -374
- data/assets/js/partytown/debug/partytown-sandbox-sw.js +0 -920
- data/assets/js/partytown/debug/partytown-sw.js +0 -59
- data/assets/js/partytown/debug/partytown-ww-atomics.js +0 -2699
- data/assets/js/partytown/debug/partytown-ww-sw.js +0 -2691
- data/assets/js/partytown/debug/partytown.js +0 -114
- data/assets/js/partytown/partytown-atomics.js +0 -600
- data/assets/js/partytown/partytown-media.js +0 -2
- data/assets/js/partytown/partytown-sw.js +0 -50
- data/assets/js/perspective.min.js +0 -182
- data/assets/js/photo-effects.json +0 -85
- data/assets/js/redirectResult.js +0 -10
- data/assets/js/sharePage.js +0 -65
- data/assets/js/testing-batch.js +0 -39
- data/assets/js/theme.js +0 -104
- data/assets/js/usageTracking.js +0 -143
- data/assets/js/usageTrackingEvents.js +0 -6
- data/assets/js/userUsageCount.js +0 -0
- data/assets/js/webvitals.js +0 -5
@@ -1,374 +0,0 @@
|
|
1
|
-
/* Partytown 0.7.5 - MIT builder.io */
|
2
|
-
(self => {
|
3
|
-
const [getter, setter, callMethod, constructGlobal, definePrototypePropertyDescriptor, randomId, WinIdKey, InstanceIdKey, ApplyPathKey] = self.$bridgeToMedia$;
|
4
|
-
delete self.$bridgeToMedia$;
|
5
|
-
const ContextKey = Symbol();
|
6
|
-
const MediaSourceKey = Symbol();
|
7
|
-
const ReadyStateKey = Symbol();
|
8
|
-
const SourceBuffersKey = Symbol();
|
9
|
-
const SourceBufferTasksKey = Symbol();
|
10
|
-
const TimeRangesKey = Symbol();
|
11
|
-
const EMPTY_ARRAY = [];
|
12
|
-
const defineCstr = (win, cstrName, Cstr) => win[cstrName] = defineCstrName(cstrName, Cstr);
|
13
|
-
const defineCstrName = (cstrName, Cstr) => Object.defineProperty(Cstr, "name", {
|
14
|
-
value: cstrName
|
15
|
-
});
|
16
|
-
const initCanvas = (WorkerBase, win) => {
|
17
|
-
const HTMLCanvasDescriptorMap = {
|
18
|
-
getContext: {
|
19
|
-
value(contextType, contextAttributes) {
|
20
|
-
this[ContextKey] || (this[ContextKey] = (contextType.includes("webgl") ? createContextWebGL : createContext2D)(this, contextType, contextAttributes));
|
21
|
-
return this[ContextKey];
|
22
|
-
}
|
23
|
-
}
|
24
|
-
};
|
25
|
-
const WorkerCanvasGradient = defineCstr(win, "CanvasGradient", class extends WorkerBase {
|
26
|
-
addColorStop(...args) {
|
27
|
-
callMethod(this, [ "addColorStop" ], args, 2);
|
28
|
-
}
|
29
|
-
});
|
30
|
-
const WorkerCanvasPattern = defineCstr(win, "CanvasPattern", class extends WorkerBase {
|
31
|
-
setTransform(...args) {
|
32
|
-
callMethod(this, [ "setTransform" ], args, 2);
|
33
|
-
}
|
34
|
-
});
|
35
|
-
const createContext2D = (canvasInstance, contextType, contextAttributes) => {
|
36
|
-
const winId = canvasInstance[WinIdKey];
|
37
|
-
const ctxInstanceId = randomId();
|
38
|
-
const ctxInstance = {
|
39
|
-
[WinIdKey]: winId,
|
40
|
-
[InstanceIdKey]: ctxInstanceId,
|
41
|
-
[ApplyPathKey]: []
|
42
|
-
};
|
43
|
-
const ctx = callMethod(canvasInstance, [ "getContext" ], [ contextType, contextAttributes ], 1, ctxInstanceId);
|
44
|
-
const ctx2dGetterMethods = "getContextAttributes,getImageData,getLineDash,getTransform,isPointInPath,isPointInStroke,measureText".split(",");
|
45
|
-
const CanvasRenderingContext2D = {
|
46
|
-
get: (target, propName) => "string" == typeof propName && propName in ctx ? "function" == typeof ctx[propName] ? (...args) => {
|
47
|
-
if (propName.startsWith("create")) {
|
48
|
-
const instanceId = randomId();
|
49
|
-
callMethod(ctxInstance, [ propName ], args, 2, instanceId);
|
50
|
-
if ("createImageData" === propName || "createPattern" === propName) {
|
51
|
-
(api => {
|
52
|
-
console.warn(`${api} not implemented`);
|
53
|
-
})(`${propName}()`);
|
54
|
-
return {
|
55
|
-
setTransform: () => {}
|
56
|
-
};
|
57
|
-
}
|
58
|
-
return new WorkerCanvasGradient(winId, instanceId);
|
59
|
-
}
|
60
|
-
const methodCallType = ctx2dGetterMethods.includes(propName) ? 1 : 2;
|
61
|
-
return callMethod(ctxInstance, [ propName ], args, methodCallType);
|
62
|
-
} : ctx[propName] : target[propName],
|
63
|
-
set(target, propName, value) {
|
64
|
-
if ("string" == typeof propName && propName in ctx) {
|
65
|
-
ctx[propName] !== value && "function" != typeof value && setter(ctxInstance, [ propName ], value);
|
66
|
-
ctx[propName] = value;
|
67
|
-
} else {
|
68
|
-
target[propName] = value;
|
69
|
-
}
|
70
|
-
return true;
|
71
|
-
}
|
72
|
-
};
|
73
|
-
return new Proxy(ctx, CanvasRenderingContext2D);
|
74
|
-
};
|
75
|
-
const createContextWebGL = (canvasInstance, contextType, contextAttributes) => {
|
76
|
-
const winId = canvasInstance[WinIdKey];
|
77
|
-
const ctxInstanceId = randomId();
|
78
|
-
const ctxInstance = {
|
79
|
-
[WinIdKey]: winId,
|
80
|
-
[InstanceIdKey]: ctxInstanceId,
|
81
|
-
[ApplyPathKey]: []
|
82
|
-
};
|
83
|
-
const ctx = callMethod(canvasInstance, [ "getContext" ], [ contextType, contextAttributes ], 1, ctxInstanceId);
|
84
|
-
const WebGLRenderingContextHandler = {
|
85
|
-
get: (target, propName) => "string" == typeof propName ? "function" != typeof ctx[propName] ? ctx[propName] : (...args) => callMethod(ctxInstance, [ propName ], args, getWebGlMethodCallType(propName)) : target[propName],
|
86
|
-
set(target, propName, value) {
|
87
|
-
if ("string" == typeof propName && propName in ctx) {
|
88
|
-
ctx[propName] !== value && "function" != typeof value && setter(ctxInstance, [ propName ], value);
|
89
|
-
ctx[propName] = value;
|
90
|
-
} else {
|
91
|
-
target[propName] = value;
|
92
|
-
}
|
93
|
-
return true;
|
94
|
-
}
|
95
|
-
};
|
96
|
-
return new Proxy(ctx, WebGLRenderingContextHandler);
|
97
|
-
};
|
98
|
-
const ctxWebGLGetterMethods = "checkFramebufferStatus,makeXRCompatible".split(",");
|
99
|
-
const getWebGlMethodCallType = methodName => methodName.startsWith("create") || methodName.startsWith("get") || methodName.startsWith("is") || ctxWebGLGetterMethods.includes(methodName) ? 1 : 2;
|
100
|
-
defineCstr(win, "CanvasGradient", WorkerCanvasGradient);
|
101
|
-
defineCstr(win, "CanvasPattern", WorkerCanvasPattern);
|
102
|
-
definePrototypePropertyDescriptor(win.HTMLCanvasElement, HTMLCanvasDescriptorMap);
|
103
|
-
};
|
104
|
-
const initMedia = (WorkerBase, WorkerEventTargetProxy, env, win) => {
|
105
|
-
var _a, _b;
|
106
|
-
win.Audio = defineCstrName("HTMLAudioElement", class {
|
107
|
-
constructor(src) {
|
108
|
-
const audio = env.$createNode$("audio", randomId());
|
109
|
-
audio.src = src;
|
110
|
-
return audio;
|
111
|
-
}
|
112
|
-
});
|
113
|
-
const WorkerAudioTrack = class extends WorkerBase {
|
114
|
-
get enabled() {
|
115
|
-
return getter(this, [ "enabled" ]);
|
116
|
-
}
|
117
|
-
set enabled(value) {
|
118
|
-
setter(this, [ "enabled" ], value);
|
119
|
-
}
|
120
|
-
get id() {
|
121
|
-
return getter(this, [ "id" ]);
|
122
|
-
}
|
123
|
-
get kind() {
|
124
|
-
return getter(this, [ "kind" ]);
|
125
|
-
}
|
126
|
-
get label() {
|
127
|
-
return getter(this, [ "label" ]);
|
128
|
-
}
|
129
|
-
get language() {
|
130
|
-
return getter(this, [ "language" ]);
|
131
|
-
}
|
132
|
-
get sourceBuffer() {
|
133
|
-
return new WorkerSourceBuffer(this);
|
134
|
-
}
|
135
|
-
};
|
136
|
-
const WorkerAudioTrackList = class {
|
137
|
-
constructor(mediaElm) {
|
138
|
-
const winId = mediaElm[WinIdKey];
|
139
|
-
const instanceId = mediaElm[InstanceIdKey];
|
140
|
-
const instance = {
|
141
|
-
addEventListener(...args) {
|
142
|
-
callMethod(mediaElm, [ "audioTracks", "addEventListener" ], args, 3);
|
143
|
-
},
|
144
|
-
getTrackById: (...args) => callMethod(mediaElm, [ "audioTracks", "getTrackById" ], args),
|
145
|
-
get length() {
|
146
|
-
return getter(mediaElm, [ "audioTracks", "length" ]);
|
147
|
-
},
|
148
|
-
removeEventListener(...args) {
|
149
|
-
callMethod(mediaElm, [ "audioTracks", "removeEventListener" ], args, 3);
|
150
|
-
}
|
151
|
-
};
|
152
|
-
return new Proxy(instance, {
|
153
|
-
get: (target, propName) => "number" == typeof propName ? new WorkerAudioTrack(winId, instanceId, [ "audioTracks", propName ]) : target[propName]
|
154
|
-
});
|
155
|
-
}
|
156
|
-
};
|
157
|
-
const WorkerSourceBufferList = defineCstr(win, "SourceBufferList", class extends Array {
|
158
|
-
constructor(mediaSource) {
|
159
|
-
super();
|
160
|
-
this[MediaSourceKey] = mediaSource;
|
161
|
-
}
|
162
|
-
addEventListener(...args) {
|
163
|
-
callMethod(this[MediaSourceKey], [ "sourceBuffers", "addEventListener" ], args, 3);
|
164
|
-
}
|
165
|
-
removeEventListener(...args) {
|
166
|
-
callMethod(this[MediaSourceKey], [ "sourceBuffers", "removeEventListener" ], args, 3);
|
167
|
-
}
|
168
|
-
});
|
169
|
-
const WorkerSourceBuffer = defineCstr(win, "SourceBuffer", (_b = class extends WorkerEventTargetProxy {
|
170
|
-
constructor(mediaSource) {
|
171
|
-
super(mediaSource[WinIdKey], mediaSource[InstanceIdKey], [ "sourceBuffers" ]);
|
172
|
-
this[_a] = [];
|
173
|
-
this[MediaSourceKey] = mediaSource;
|
174
|
-
}
|
175
|
-
abort() {
|
176
|
-
const sbIndex = getSourceBufferIndex(this);
|
177
|
-
callMethod(this, [ sbIndex, "appendWindowStart" ], EMPTY_ARRAY, 1);
|
178
|
-
}
|
179
|
-
addEventListener(...args) {
|
180
|
-
const sbIndex = getSourceBufferIndex(this);
|
181
|
-
callMethod(this, [ sbIndex, "addEventListener" ], args, 3);
|
182
|
-
}
|
183
|
-
appendBuffer(buf) {
|
184
|
-
this[SourceBufferTasksKey].push([ "appendBuffer", [ buf ], buf ]);
|
185
|
-
drainSourceBufferQueue(this);
|
186
|
-
}
|
187
|
-
get appendWindowStart() {
|
188
|
-
const sbIndex = getSourceBufferIndex(this);
|
189
|
-
return getter(this, [ sbIndex, "appendWindowStart" ]);
|
190
|
-
}
|
191
|
-
set appendWindowStart(value) {
|
192
|
-
const sbIndex = getSourceBufferIndex(this);
|
193
|
-
setter(this, [ sbIndex, "appendWindowStart" ], value);
|
194
|
-
}
|
195
|
-
get appendWindowEnd() {
|
196
|
-
const sbIndex = getSourceBufferIndex(this);
|
197
|
-
return getter(this, [ sbIndex, "appendWindowEnd" ]);
|
198
|
-
}
|
199
|
-
set appendWindowEnd(value) {
|
200
|
-
const sbIndex = getSourceBufferIndex(this);
|
201
|
-
setter(this, [ sbIndex, "appendWindowEnd" ], value);
|
202
|
-
}
|
203
|
-
get buffered() {
|
204
|
-
const mediaSource = this[MediaSourceKey];
|
205
|
-
const sbIndex = getSourceBufferIndex(this);
|
206
|
-
const timeRanges = new WorkerTimeRanges(mediaSource[WinIdKey], mediaSource[InstanceIdKey], [ "sourceBuffers", sbIndex, "buffered" ]);
|
207
|
-
return timeRanges;
|
208
|
-
}
|
209
|
-
changeType(mimeType) {
|
210
|
-
const sbIndex = getSourceBufferIndex(this);
|
211
|
-
callMethod(this, [ sbIndex, "changeType" ], [ mimeType ], 2);
|
212
|
-
}
|
213
|
-
get mode() {
|
214
|
-
const sbIndex = getSourceBufferIndex(this);
|
215
|
-
return getter(this, [ sbIndex, "mode" ]);
|
216
|
-
}
|
217
|
-
set mode(value) {
|
218
|
-
const sbIndex = getSourceBufferIndex(this);
|
219
|
-
setter(this, [ sbIndex, "mode" ], value);
|
220
|
-
}
|
221
|
-
remove(start, end) {
|
222
|
-
this[SourceBufferTasksKey].push([ "remove", [ start, end ] ]);
|
223
|
-
drainSourceBufferQueue(this);
|
224
|
-
}
|
225
|
-
removeEventListener(...args) {
|
226
|
-
const sbIndex = getSourceBufferIndex(this);
|
227
|
-
callMethod(this, [ sbIndex, "removeEventListener" ], args, 3);
|
228
|
-
}
|
229
|
-
get timestampOffset() {
|
230
|
-
const sbIndex = getSourceBufferIndex(this);
|
231
|
-
return getter(this, [ sbIndex, "timestampOffset" ]);
|
232
|
-
}
|
233
|
-
set timestampOffset(value) {
|
234
|
-
const sbIndex = getSourceBufferIndex(this);
|
235
|
-
setter(this, [ sbIndex, "timestampOffset" ], value);
|
236
|
-
}
|
237
|
-
get updating() {
|
238
|
-
const sbIndex = getSourceBufferIndex(this);
|
239
|
-
return getter(this, [ sbIndex, "updating" ]);
|
240
|
-
}
|
241
|
-
}, _a = SourceBufferTasksKey, _b));
|
242
|
-
const WorkerTimeRanges = defineCstr(win, "TimeRanges", class extends WorkerBase {
|
243
|
-
start(...args) {
|
244
|
-
return callMethod(this, [ "start" ], args);
|
245
|
-
}
|
246
|
-
end(...args) {
|
247
|
-
return callMethod(this, [ "end" ], args);
|
248
|
-
}
|
249
|
-
get length() {
|
250
|
-
return getter(this, [ "length" ]);
|
251
|
-
}
|
252
|
-
});
|
253
|
-
const getSourceBufferIndex = sourceBuffer => {
|
254
|
-
if (sourceBuffer) {
|
255
|
-
const mediaSource = sourceBuffer[MediaSourceKey];
|
256
|
-
const sourceBufferList = mediaSource[SourceBuffersKey];
|
257
|
-
return sourceBufferList.indexOf(sourceBuffer);
|
258
|
-
}
|
259
|
-
return -1;
|
260
|
-
};
|
261
|
-
const drainSourceBufferQueue = sourceBuffer => {
|
262
|
-
if (sourceBuffer[SourceBufferTasksKey].length) {
|
263
|
-
if (!sourceBuffer.updating) {
|
264
|
-
const task = sourceBuffer[SourceBufferTasksKey].shift();
|
265
|
-
if (task) {
|
266
|
-
const sbIndex = getSourceBufferIndex(sourceBuffer);
|
267
|
-
callMethod(sourceBuffer, [ sbIndex, task[0] ], task[1], 3, void 0, task[2]);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
setTimeout((() => drainSourceBufferQueue(sourceBuffer)), 50);
|
271
|
-
}
|
272
|
-
};
|
273
|
-
const HTMLMediaDescriptorMap = {
|
274
|
-
buffered: {
|
275
|
-
get() {
|
276
|
-
if (!this[TimeRangesKey]) {
|
277
|
-
this[TimeRangesKey] = new WorkerTimeRanges(this[WinIdKey], this[InstanceIdKey], [ "buffered" ]);
|
278
|
-
setTimeout((() => {
|
279
|
-
this[TimeRangesKey] = void 0;
|
280
|
-
}), 5e3);
|
281
|
-
}
|
282
|
-
return this[TimeRangesKey];
|
283
|
-
}
|
284
|
-
},
|
285
|
-
readyState: {
|
286
|
-
get() {
|
287
|
-
if (4 === this[ReadyStateKey]) {
|
288
|
-
return 4;
|
289
|
-
}
|
290
|
-
if ("number" != typeof this[ReadyStateKey]) {
|
291
|
-
this[ReadyStateKey] = getter(this, [ "readyState" ]);
|
292
|
-
setTimeout((() => {
|
293
|
-
this[ReadyStateKey] = void 0;
|
294
|
-
}), 1e3);
|
295
|
-
}
|
296
|
-
return this[ReadyStateKey];
|
297
|
-
}
|
298
|
-
}
|
299
|
-
};
|
300
|
-
defineCstr(win, "MediaSource", class extends WorkerEventTargetProxy {
|
301
|
-
constructor() {
|
302
|
-
super(env.$winId$);
|
303
|
-
this[SourceBuffersKey] = new WorkerSourceBufferList(this);
|
304
|
-
constructGlobal(this, "MediaSource", EMPTY_ARRAY);
|
305
|
-
}
|
306
|
-
get activeSourceBuffers() {
|
307
|
-
return [];
|
308
|
-
}
|
309
|
-
addSourceBuffer(mimeType) {
|
310
|
-
const sourceBuffer = new WorkerSourceBuffer(this);
|
311
|
-
this[SourceBuffersKey].push(sourceBuffer);
|
312
|
-
callMethod(this, [ "addSourceBuffer" ], [ mimeType ]);
|
313
|
-
return sourceBuffer;
|
314
|
-
}
|
315
|
-
clearLiveSeekableRange() {
|
316
|
-
callMethod(this, [ "clearLiveSeekableRange" ], EMPTY_ARRAY, 2);
|
317
|
-
}
|
318
|
-
get duration() {
|
319
|
-
return getter(this, [ "duration" ]);
|
320
|
-
}
|
321
|
-
set duration(value) {
|
322
|
-
setter(this, [ "duration" ], value);
|
323
|
-
}
|
324
|
-
endOfStream(endOfStreamError) {
|
325
|
-
callMethod(this, [ "endOfStream" ], [ endOfStreamError ], 3);
|
326
|
-
}
|
327
|
-
get readyState() {
|
328
|
-
return getter(this, [ "readyState" ]);
|
329
|
-
}
|
330
|
-
removeSourceBuffer(sourceBuffer) {
|
331
|
-
const index = getSourceBufferIndex(sourceBuffer);
|
332
|
-
if (index > -1) {
|
333
|
-
this[SourceBuffersKey].splice(index, 1);
|
334
|
-
callMethod(this, [ "removeSourceBuffer" ], [ index ], 1);
|
335
|
-
}
|
336
|
-
}
|
337
|
-
setLiveSeekableRange(start, end) {
|
338
|
-
callMethod(this, [ "setLiveSeekableRange" ], [ start, end ], 2);
|
339
|
-
}
|
340
|
-
get sourceBuffers() {
|
341
|
-
return this[SourceBuffersKey];
|
342
|
-
}
|
343
|
-
static isTypeSupported(mimeType) {
|
344
|
-
if (!isStaticTypeSupported.has(mimeType)) {
|
345
|
-
const isSupported = callMethod(win, [ "MediaSource", "isTypeSupported" ], [ mimeType ]);
|
346
|
-
isStaticTypeSupported.set(mimeType, isSupported);
|
347
|
-
}
|
348
|
-
return isStaticTypeSupported.get(mimeType);
|
349
|
-
}
|
350
|
-
});
|
351
|
-
const winURL = win.URL = defineCstrName("URL", class extends URL {});
|
352
|
-
const hasAudioTracks = "audioTracks" in win.HTMLMediaElement.prototype;
|
353
|
-
if (hasAudioTracks) {
|
354
|
-
defineCstr(win, "AudioTrackList", WorkerAudioTrackList);
|
355
|
-
defineCstr(win, "AudioTrack", WorkerAudioTrack);
|
356
|
-
HTMLMediaDescriptorMap.audioTracks = {
|
357
|
-
get() {
|
358
|
-
return new WorkerAudioTrackList(this);
|
359
|
-
}
|
360
|
-
};
|
361
|
-
}
|
362
|
-
definePrototypePropertyDescriptor(win.HTMLMediaElement, HTMLMediaDescriptorMap);
|
363
|
-
winURL.createObjectURL = obj => callMethod(win, [ "URL", "createObjectURL" ], [ obj ]);
|
364
|
-
winURL.revokeObjectURL = obj => callMethod(win, [ "URL", "revokeObjectURL" ], [ obj ]);
|
365
|
-
};
|
366
|
-
const isStaticTypeSupported = new Map;
|
367
|
-
self.$bridgeFromMedia$ = (WorkerBase, WorkerEventTargetProxy, env, win, windowMediaConstructors) => {
|
368
|
-
windowMediaConstructors.map((mediaCstrName => {
|
369
|
-
delete win[mediaCstrName];
|
370
|
-
}));
|
371
|
-
initCanvas(WorkerBase, win);
|
372
|
-
initMedia(WorkerBase, WorkerEventTargetProxy, env, win);
|
373
|
-
};
|
374
|
-
})(self);
|