{"version":3,"file":"view.mjs","names":[],"sources":["../../src/video/view.js"],"sourcesContent":["import { getElement, store } from '@wordpress/interactivity';\nimport { prefersReducedMotion } from '../utils/reduced-motion';\n\nstore(\n\t'core/video',\n\t{\n\t\tcallbacks: {\n\t\t\tstopAutoplay() {\n\t\t\t\tif ( ! prefersReducedMotion() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The video is saved with `autoplay`, so it is stopped here\n\t\t\t\t// rather than never started. Clearing the attribute as well\n\t\t\t\t// keeps it from playing again if the source reloads.\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tref.autoplay = false;\n\t\t\t\tref.pause();\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"mappings":";;;AAGA,MACC,cACA,EACC,WAAW,EACV,eAAe;CACd,IAAK,CAAE,qBAAqB,GAC3B;CAMD,MAAM,EAAE,QAAQ,WAAW;CAC3B,IAAI,WAAW;CACf,IAAI,MAAM;AACX,EACD,EACD,GACA,EAAE,MAAM,KAAK,CACd"}