@wordpress/block-library
Version:
Block library for the WordPress editor.
20 lines (19 loc) • 477 B
JavaScript
// packages/block-library/src/cover/view.js
import { getContext, store } from "@wordpress/interactivity";
import { prefersReducedMotion } from "@wordpress/a11y";
store(
"core/cover",
{
state: {
get videoSrc() {
const { src, reducedMotionSrc } = getContext();
if (reducedMotionSrc && prefersReducedMotion()) {
return reducedMotionSrc;
}
return src;
}
}
},
{ lock: true }
);
//# sourceMappingURL=view.mjs.map