4.3.2 • Published 3 years ago

@solyd/client-sdk v4.3.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 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

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.0

3 years ago

4.0.4

3 years ago

4.0.7

3 years ago

4.0.6

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.3

3 years ago

4.1.1

3 years ago

4.0.2

3 years ago

3.3.8

3 years ago

3.3.7

3 years ago

3.3.6

3 years ago

3.3.5

3 years ago

3.3.4

3 years ago

3.3.3

3 years ago

3.3.2

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago