3.4.0 • Published 7 years ago

pie-player v3.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

pie-player

A custom element for containing a pie player.

usage

see here for more information.

Create the element in the markup and wait for the pie-player-ready event, in the handler set the properties:

  • session - an array of session data
  • env - an env object
  • controllers - an object that exposes some methods for processing:
    • model(ids, session, env) => Promise<Array[{}]> - this is used for setting the model data on the ui elements
<script type="text/javascript">

  document.addEventListener('DOMContentLoaded', function(){
    var player = document.querySelector('pie-player');
    player.addEventListener('ready', function(){
      player.controllers = //..
      player.session(session)
        .then(() => player.env(env))
        .then(() => console.log('player is ready'))
        
    });
  });
</script>
<pie-player>
  <my-pie-element data-id="1"></my-pie-element>
</pie-player>

Browser Integration

This package exports an es6 module, so you'll have to include it in a build tool like webpack and babel.

Unit testing

  • runs selenium > requires jdk 1.8

We use webpack and web-component-tester to test the element. Webpack builds a test bundler and the wct runs the test suite.

npm test

release

npm run release
3.4.0

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago