@hyperframes/core 0.9.3 → 0.9.5
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const STUDIO_PREVIEW_MARK_META = "hyperframes-studio-preview";
|
|
2
2
|
export declare const STUDIO_PREVIEW_CAPTURE_MODE = "capture";
|
|
3
|
+
export declare const PLAYER_FRAME_ATTR = "data-hf-player-frame";
|
|
4
|
+
export declare function inPlayerFrame(doc: Document): boolean;
|
|
5
|
+
export declare function defersMediaIn(doc: Document): boolean;
|
|
3
6
|
export declare const STUDIO_PREVIEW_UPCOMING_ATTR = "data-hf-upcoming";
|
|
4
7
|
export declare const STUDIO_PREVIEW_LAZY_ATTR = "data-hf-preview-lazy";
|
|
5
8
|
export declare const STUDIO_PREVIEW_ERRORS = "__hfPreviewErrors";
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { isWebKit } from "./runtime/mediaClock.js";
|
|
1
2
|
export const STUDIO_PREVIEW_MARK_META = "hyperframes-studio-preview";
|
|
2
3
|
export const STUDIO_PREVIEW_CAPTURE_MODE = "capture";
|
|
4
|
+
export const PLAYER_FRAME_ATTR = "data-hf-player-frame";
|
|
5
|
+
export function inPlayerFrame(doc) {
|
|
6
|
+
return isWebKit() && doc.defaultView?.frameElement?.hasAttribute(PLAYER_FRAME_ATTR) === true;
|
|
7
|
+
}
|
|
8
|
+
export function defersMediaIn(doc) {
|
|
9
|
+
return (doc.querySelector(`meta[name="${STUDIO_PREVIEW_MARK_META}"]`) !== null || inPlayerFrame(doc));
|
|
10
|
+
}
|
|
3
11
|
export const STUDIO_PREVIEW_UPCOMING_ATTR = "data-hf-upcoming";
|
|
4
12
|
export const STUDIO_PREVIEW_LAZY_ATTR = "data-hf-preview-lazy";
|
|
5
13
|
export const STUDIO_PREVIEW_ERRORS = "__hfPreviewErrors";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -433,9 +433,9 @@
|
|
|
433
433
|
"linkedom": "^0.18.12",
|
|
434
434
|
"postcss": "^8.5.8",
|
|
435
435
|
"wawoff2": "^2.0.1",
|
|
436
|
-
"@hyperframes/parsers": "0.9.
|
|
437
|
-
"@hyperframes/
|
|
438
|
-
"@hyperframes/
|
|
436
|
+
"@hyperframes/parsers": "0.9.5",
|
|
437
|
+
"@hyperframes/studio-server": "0.9.5",
|
|
438
|
+
"@hyperframes/lint": "0.9.5"
|
|
439
439
|
},
|
|
440
440
|
"devDependencies": {
|
|
441
441
|
"@fontsource/archivo-black": "^5.2.8",
|