qplayer-npm

1.0.3 • Public • Published

This npm is a loader for Qencode Player that can be used to initiate player on client side. Below is minimalistic example for ReactJS.

import { useEffect } from 'react';

import './App.css';

import {qPlayer} from 'qplayer-npm';

let params = {
  licenseKey: 'your-player-license-key',
  videoSources: { src: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8" }
}

function App() {

  useEffect(() => {

    // initiate player after component was mounted
    qPlayer("player", params, function(){
      console.log("Player initiated")
    });

  });

  return (
    <div className="App">
      <h1>Qencode Player test</h1>
      <div id="player"></div>
    </div>
  );
}

export default App;

Readme

Keywords

none

Package Sidebar

Install

npm i qplayer-npm

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

1.88 kB

Total Files

3

Last publish

Collaborators

  • brootle