npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

europeanamediaplayer

v0.6.0

Published

[![Build Status](https://travis-ci.com/europeana/media-player.svg?branch=master)](https://travis-ci.com/europeana/media-player) [![Maintainability](https://api.codeclimate.com/v1/badges/034304037fa168609682/maintainability)](https://codeclimate.com/github

Downloads

9

Readme

Europeana Media Player Library

Build Status Maintainability

Created as part of the Europeana Media Project

Build Setup

Install package dependencies:

  • npm install

Linting

To lint-check the .js run:

  • npm run lint
  • npm run lint:fix

To lint-check the .scss run:

  • npm run lint:style
  • npm run lint:style:fix

Testing

Run unit tests with either of:

  • npm run test
  • npm test

Generate a coverage report with:

  • npm run test:coverage

Run an accessibility test with:

  • npm run test:accessibility

Run end-to-end tests with:

  • npm run test:e2e (defaults to chrome) or with the browser-specific commands:
  • npm run test:e2e:chrome
  • npm run test:e2e:firefox
  • npm run test:e2e:chrome:headless
  • npm run test:e2e:firefox:headless
  • npm run test:e2e:headless
  • npm run test:e2e:all

Build for production

Run:

  • npm run build:production

Publication

Dependencies

The player has unbundled dependencies on jQuery and jQuery-UI that have not been packed into this library. Further dashjs is needed if you plan to stream MPEG DASH videos.

Embed player

To embed the player please firstyourself first make sure to include the Europeana Media Player Library

import EuropeanaMediaPlayer from 'europeanamediaplayer';

or

const EuropeanaMediaPlayer = require("europeanamediaplayer").default;

The constructor of the Europeana Media Player is

var player = new EuropeanaMediaPlayer(container, videoObject[, options]);

The constructor accepts the following parameters

Name | Type | Description ---- | ---- | ----------- container| DOM Element | the DOM element in which to create the player videoObject | JSON Object | the object containing the video properties options | JSON Object | an optional object containing the player options

The videoObject requires the following property

Name | Type | Description ---- | ---- | ----------- manifest | String | the url of the IIIF manifest for the media item

The options accepts the following properties

Name | Type | Description ---- | ---- | ----------- editor | String | url, allows to configure an external editor so that embedding and other editorial options can be done on that page language | String | 2 character iso 639-1 language code, all official languages of the European Union are supported. The default language is English

Examples

Basic example

This basic example contains only the required parameters.

var container = document.body;
var videoObj = { manifest : "https://iiif.europeana.eu/presentation/2051906/data_euscreenXL_http___openbeelden_nl_media_9972/manifest?format=3" };
new EuropeanaMediaPlayer(container, videoObj);

Editor example

This example sets the editor to show the editorial option menu in the player.

var container = document.body;
var videoObj = { manifest : "https://iiif.europeana.eu/presentation/2051906/data_euscreenXL_http___openbeelden_nl_media_9972/manifest?format=3" };
var options = { editor: "https://video-editor.eu" };
new EuropeanaMediaPlayer(container, videoObj, options);

Editor and language example

This example sets besides the editor the player interface language to Dutch

var container = document.body;
var videoObj = { manifest : "https://iiif.europeana.eu/presentation/2051906/data_euscreenXL_http___openbeelden_nl_media_9972/manifest?format=3" };
var options = { editor: "https://video-editor.eu", language: "nl" };
new EuropeanaMediaPlayer(container, videoObj, options);

License

Licensed under the EUPL v1.2.

For full details, see LICENSE.md.