4.3.2 • Published 2 years ago

@solyd/client-sdk v4.3.2

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

Solyd 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 @solyd/client-sdk
# or
yarn add react react-redux redux @solyd/client-sdk

Usage

import { useSolyd, Track, SolydProvider } from '@solyd/client-sdk';

const MyClient = () => {
  const { connected, muted, setMuted, participants } = useSolyd({
    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 = () => (
  <SolydProvider>
    <MyClient />
  </SolydProvider>
);
4.3.2

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

4.0.4

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.3

2 years ago

4.1.1

2 years ago

4.0.2

2 years ago

3.3.8

2 years ago

3.3.7

2 years ago

3.3.6

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago