Package Exports
- @splidejs/splide-extension-video
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@splidejs/splide-extension-video) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Extension of Splide for playing videos
This is an extension of the Splide slider library for playing videos of YouTube and Vimeo. You must get Splide before using it.
Installation
NPM(Recommended)
- Get the latest extension by NPM:
$ npm install @splidejs/splide-extension-video
- Link to the stylesheet:
<link rel="stylesheet" href="node_modules/@splidejs/splide-extension-video/dist/css/splide-extension-video.min.css">
- Mount the extension to the Splide.
import Splide from '@splidejs/splide'; import Video from '@splidejs/splide-extension-video'; new Splide( '#splide' ).mount( { Video } );
CDN or Hosting Files
- Visit jsDelivr and get the links of the latest files or download files from the dist library.
- Import minified stylesheet and JavaScript files on your site:Note that version numbers above are incorrect.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide-extension-video@0.0.2/dist/css/splide-extension-video.min.css"> <script src="https://cdn.jsdelivr.net/npm/@splidejs/splide-extension-video@0.0.2/dist/js/splide-extension-video.min.js">
- Mount the extension to the Splide.
new Splide( '#splide' ).mount( splide.Extensions );
Available Options
- autoplay: Whether to play the video automatically.
- hideControls: Hide the video control UI.
- disableFullScreen: Hide full screen button(Only for YouTube).
- loop: Loop the video.
- mute: Mute the video.
License
Splide is released under the MIT license.
© 2020 Naotoshi Fujita