NPO Player Client Library
This package provides an easy way embed the NPO Player on your website.
The purpose of this package is to help web developers to use the Player provided by the NPO on their website.
First, add the package to composer:
composer require kro-ncrv/npoplayer
Then, create an instance of class NPOPlayer/Client with the provided API key and, if necessary, extra options.
$client = new NPOPlayer\Client( 'e45fe473feaf42ad9a215007c6aa5e7e', [ 'baseUrl' => 'https://player.it-labs.nl' ] )
After you have an instance you can execute the getEmbedCode function to retrieve a block with a script element to include in your template:
$embedCode = $client->getEmbedCode( 'KN_1688563', // Media ID 'player', // ID of DIV element to put player in ['autoplay' => true] // Extra options for player );
You can find a working example in tests/test.php
Send any question about this package to firstname.lastname@example.org