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

dailymotion-live-chat

v1.10.2

Published

Dailymotion Live Chat

Downloads

37

Readme

Dailymotion Chat javascript plugin

Import via CDN

<script src="https://npmcdn.com/dailymotion-live-chat/dist/embed/js/dailymotion-live-chat.js"></script>

Usage

Instanciate chat plugin:

var c = new window.DmChat(options);

Here is an overview of defaults values for options:

var c = new window.DmChat({
  owner: null,                          // Username of chat owner (required)
  name: null,                           // Name of your room (required)
  placeholder: document.body,           // Chat placeholder (DOM element)
  styles: 'live',                       // Chat's styling (live || games)
  api_key: null,                        // Dailymotion API key
  mobile: false,                        // Mobile version
  onLogged: null,                       // After login callback function
  onLogin: null,                        // Function provided to handle login
  access_token: null,                   // DM access_token (to prevent popup login)
  api_endpoint: null,                   // Api endpoint (ex: stage-01.dailymotion.com)
  grosminet_endpoint: null,             // Grosminet endpoint (ex: http://dmchat.dailymotion.com:80)
  wordsBlacklist: ['word1', 'word2'],   // Array of words to blacklist (will appear as *****)
  debug: false                          // Enable or disable console.log with debug
});

Available function:

c.changeSkin(skin);

skin parameter should be equal to 'light' or 'dark'

Commands

Mute user

/mute username
/mute @username

Unmute

/unmute username
/unmute @username

Ban

/ban username
/ban @username

Unban

/unban username
/unban @username

Reply to last mention

/r

Dailymotion Chat React component

Install

npm install dailymotion-live-chat --save

Usage

See example, in example/ folder.

let React = require('react');
let DmChat = require ('dailymotion-live-chat');

React.render(
  <DmChat
    name="x2ns1iw"
    ownerUsername="httpete"
    styles="games"
  />
, document.querySelector('.chat-placeholder'));

Development

Install

Install all dependencies...

$ npm install

...and rename sample.config.js to dev.config.js

cp app/scripts/config/sample.config.js app/scripts/config/dev.config.js

Run development server

$ gulp dev

Gulp will start a webpack dev server with hot-reload at port 9099. You can define a port with $ gulp --port 3333.

An online version of grominet backend is available at 'http://dmchat.dailymotion.com:80 You can still build grominet locally (live-chat backend https://github.com/dailymotion/grosminet), and specify the right url in config.js (GROMINET_ENDPOINT)

Build

Builds a minified version of the js plugin + react component + embed version (with assets from npmcdn.com)

$ gulp build