Để sử dụng thư viện các bạn nên:
<!-- Include the stylesheet, this could be direct from the package or bundled --> <link rel="stylesheet" href="node_modules/lite-youtube-embed/src/lite-yt-embed.css" /> <!-- Include the custom element script --> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20src%3D%22node_modules%2Flite-youtube-embed%2Fsrc%2Flite-yt-embed.js%22%3E%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" /> <!-- Use the element. You may define uses before the scripts are parsed and executed--> <lite-youtube videoid="ogfYd705cRs"></lite-youtube> <!--Use this as your HTML, load the script asynchronously, and let the JS progressively enhance it--> <lite-youtube videoid="ogfYd705cRs" style="background-image: url('https://i.ytimg.com/vi/ogfYd705cRs/hqdefault.jpg');"> <div class="lty-playbtn"></div> </lite-youtube>