Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lucasrodcosta/clappr-nerd-stats

A Clappr UI plugin to show statistics provided by clappr-stats
https://github.com/lucasrodcosta/clappr-nerd-stats

clappr-player plugin statistics video-player

Last synced: 4 days ago
JSON representation

A Clappr UI plugin to show statistics provided by clappr-stats

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/clappr-nerd-stats.svg)](https://badge.fury.io/js/clappr-nerd-stats)
[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)

# Clappr Nerd Stats
A [Clappr](https://github.com/clappr/clappr) UI plugin to show statistics provided by
[clappr-stats](https://github.com/clappr/clappr-stats).

You can see a working demo in [JSFiddle](https://jsfiddle.net/lucasrodcosta/yvgebksv/) or [CodePen](https://codepen.io/lucasrodcosta/pen/eRxOEY).


Clappr Nerd Stats

## Usage

You can use it from JSDelivr (`https://cdn.jsdelivr.net/npm/clappr-nerd-stats/dist/clappr-nerd-stats.min.js`) or as
a NPM package.

```html





window.player = new Clappr.Player({
parentId: '#player',
plugins: [ClapprNerdStats, ClapprStats],
source: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4',
height: 607.5,
width: 1080,
clapprNerdStats: {
// Optional: provide multiple combination of keyboard shortcuts to show/hide the statistics.
// For reference, visit: https://github.com/ccampbell/mousetrap.
// Default: ['command+shift+s', 'ctrl+shift+s']
shortcut: ['command+shift+s', 'ctrl+shift+s'],

// Optional: position of the icon to show/hide the statistics.
// Values: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'none'
// Default: 'top-right'
iconPosition: 'top-right'
}
})

```

Now, just press `` or click in the info icon to show/hide the stats.

Note that this plugin depends on `clappr-stats`. So, you must include both `ClapprNerdStats` and
`ClapprStats` in plugins list above.