2.3.0 • Published 4 years ago

@ndxlabs/ndx-js v2.3.0

Weekly downloads
9
License
AGPL-3.0-or-later
Repository
github
Last release
4 years ago

Installation

npm install @ndxlabs/ndx-js

Usage

Javascript

<div class="ndx-embed"></div>

<script src="https://unpkg.com/@ndxlabs/ndx-js"></script>
<script>

  ndx.configure({
    apiKey: 'ab3rGRg4iwC5Qy...'
  });

  const tech = ndx.Tech('.ndx-embed', '1234567...', {
    list: {
      orientation: ndx.HORIZONTAL,
      style: {
        position: 'absolute',
        bottom: '2em',
        left: '0'
      }
    }
  });

  tech.list.show().updateTime(5);

</script>

React

import React from 'react';
import { withRouter } from 'react-router';
import { NDX, Tech } from '@ndxlabs/ndx-js';

import Controls from '../../components/Controls';
import Player from '../../components/Player';

function Watch({ match, store }) {
  const { videoId } = match.params;
  const { playing, currentTime } = store.getState().player;

  return (
    <div className="watch-page">
      <NDX apiKey={process.env.REACT_APP_NDX_API_KEY} />
      <Player>
        <Tech
          videoId={videoId}
          show={!playing}
          currentTime={currentTime}
        />
        <Controls />
      </Player>
    </div>
  );
});

export default withRouter(Watch);
2.3.0

4 years ago

2.2.0

4 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago