2.10.5 • Published 2 years ago

@lyno/client-sdk v2.10.5

Weekly downloads
50
License
ISC
Repository
-
Last release
2 years ago

Lyno Client SDK

  • State saved in react context
  • SDK should be based on hooks and not provide any frontend code

  • TODO: how to disconnect (connected variable and execute leave method on hangup?)

  • Notification should include user avatar with fallback to favicon
  • disconnect and reconnect if token has changed and already connected
  • electron events on leave to trigger window closing

Install

npm install react react-redux redux @lyno/client-sdk
# or
yarn add react react-redux redux @lyno/client-sdk

Usage

import { useLyno, Track, LynoProvider } from '@lyno/client-sdk';

const MyClient = () => {
  const { connected, muted, setMuted, participants } = useLyno({
    endpoint: process.env.JITSI_HOSTNAME,
    token: 'hj85ingmg9950tjmmvdrpo90jgpo',
  });

  return connected ? (
    <div>
      {participants.map(({ avatar, tracks }) => (
        <>
          <image src={avatar} />
          {tracks.map((track) => <Track track={track} />)}
        </>
      ))}
      <button onClick={() => setMuted(!muted)}>
        {muted ? 'muted' : 'mute'}
      </button>
    </div>
  ): null;
};

const App = () => (
  <LynoProvider>
    <MyClient />
  </LynoProvider>
);
2.10.1

2 years ago

2.10.2

2 years ago

2.10.5

2 years ago

2.10.3

2 years ago

2.10.4

2 years ago

2.9.1

3 years ago

2.8.11

3 years ago

2.8.10

3 years ago

2.8.9

3 years ago

2.8.8

3 years ago

2.8.7

3 years ago

2.8.6

3 years ago

2.8.5

3 years ago

2.8.4

3 years ago

2.8.3

3 years ago

2.8.2

3 years ago

2.8.1

3 years ago

2.8.0

3 years ago

2.7.6

3 years ago

2.7.4

3 years ago

2.7.3

3 years ago

2.7.5

3 years ago

2.7.2

3 years ago

2.7.1

3 years ago

2.7.0

3 years ago

2.6.1

3 years ago

2.6.0

3 years ago

2.6.3

3 years ago

2.6.2

3 years ago

2.5.11

3 years ago

2.5.12

3 years ago

2.5.10

3 years ago

2.5.3

3 years ago

2.5.2

3 years ago