UI component to get a sezion id from the url and initialize a sezion's player.
By default, the component will try to auto initialize players on document load.
Please note If you are using the script tag to import the component, all the properties must be accesses through sezionPlayerInjector
Include in the html the iframe tag with the GlobalSezionPlayerInjectorParams.query
.
The component will try to get the video id from the url using GlobalSezionPlayerInjectorParams.urlSearchParam
<iframe data-sezion-player-injector></iframe>
To disable the auto init use SezionPlayerInjector.GLOBAL.autoInitOnLoad = false
<script src="../dist/sezion-player-injector.js"></script>
<script>
sezionPlayerInjector.SezionPlayerInjector.GLOBAL.autoInitOnLoad = false;
</script>
## Auto init with id in the element
Include in the html the iframe tag with the `GlobalSezionPlayerInjectorParams.query`
```html
<iframe data-sezion-player-injector data-sezion-video-id="videoId"></iframe>
To disable the auto init use SezionPlayerInjector.GLOBAL.autoInitOnLoad = false
<script src="../dist/sezion-player-injector.js"></script>
<script>
sezionPlayerInjector.SezionPlayerInjector.GLOBAL.autoInitOnLoad = false;
</script>
<head>
<script src="../dist/sezion-player-injector.js"></script>
<script>
sezionPlayerInjector.SezionPlayerInjector.GLOBAL.autoInitOnLoad = false;
</script>
</head>
<body>
<iframe id="sezionPlayer"></iframe>
<script>
new sezionPlayerInjector.SezionPlayerInjector({
element:"#sezionPlayer",
videoId:"videoId"
});
</script>
</body>
Examples are available in the examples
folder.
Also could be checked here:
- http://enproyecto.com/spi/url.html?sezionVideo=5818e54ef0f8f11703fa2b1d
- http://enproyecto.com/spi/attribute.html
- http://enproyecto.com/spi/manual.html
- http://enproyecto.com/spi/disable-auto-init.html
Available tasks:
-
npm run build
: Build the sources. Generatesdist
andesm2015
-
npm run doc
: Generate the docs -
npm run changelog
: Generate the changelog