mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
build(spf): build26 from 45504a2b
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
//#region src/media/utils/preload.ts
|
||||
function isStandardPreload(value) {
|
||||
return value === "auto" || value === "metadata" || value === "none";
|
||||
}
|
||||
/**
|
||||
* Default `preload` value used as the fallback across behaviors
|
||||
* (`syncPreload`, `resolvePresentation`, `isBlockingPreload`). Matches the
|
||||
* `<video>`/`<audio>` element's implicit default.
|
||||
*/
|
||||
const DEFAULT_PRELOAD = "metadata";
|
||||
/**
|
||||
* True when the preload value blocks initial resolution / loading.
|
||||
* Falsy values (undefined, empty) fall back to `defaultPreload` (default
|
||||
* `DEFAULT_PRELOAD`); the resolved value blocks iff it is `'none'`.
|
||||
*/
|
||||
function isBlockingPreload(preload, defaultPreload = DEFAULT_PRELOAD) {
|
||||
return (preload || defaultPreload) === "none";
|
||||
}
|
||||
//#endregion
|
||||
export { DEFAULT_PRELOAD, isBlockingPreload, isStandardPreload };
|
||||
|
||||
//# sourceMappingURL=preload.js.map
|
||||
Reference in New Issue
Block a user