Skip to content

denysdesign/js-youtube-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JS module for responsive YouTube player

How to us?

Add to package.json dependencies:

  "dependencies": {
    "@denysdesign/js-youtube-player": "denysdesign/js-youtube-player",
  }

Add to index.js:

    // YouTube
    const ytContent = '.js-content';
    if (document.querySelector(ytContent)) {
        import(
            /* webpackChunkName: "module-js-youtube-player" */
            /* webpackPreload: true */
            /* webpackPrefetch: true */
            '@denysdesign/js-youtube-player').then(module => {
                module.default(ytContent);
            }
        )
    }