Skip to content

Releases: livepeer/ui-kit

@livepeer/[email protected]

27 Sep 22:48
8d33e48

Choose a tag to compare

Patch Changes

  • #68 8f5e4a3 Thanks @victorges! - Allow configuring base URL of Livepeer Studio provider

    You can now configure more parameters of the the Livepeer Studio provider,
    including specifically the baseUrl for the API calls.

    const livepeer = createReactClient({
      provider: studioProvider({
        baseUrl: 'https://studio.my-domain.com/root/api',
        apiKey: '123-abcd',
      }),
    });

@livepeer/[email protected]

22 Sep 00:40
4adf834

Choose a tag to compare

Minor Changes

  • #47 461eb4e Thanks @0xcadams! - Refactor: modified exports in @livepeer/react to re-export from livepeer and livepeer/providers/studio for a better devex. This makes the livepeer dependency unnecessary for React projects.

    +export {
    +  allChainId,
    +  arbitrumOneAddress,
    +  arbitrumRinkebyAddress,
    +  ArbRetryableTxABI,
    +  BondingManagerABI,
    +  Client,
    +  ControllerABI,
    +  createStorage,
    +  defaultStudioApiKey,
    +  defaultTranscodingProfiles,
    +  InboxABI,
    +  L1BondingManagerABI,
    +  L1MigratorABI,
    +  L2LPTGatewayABI,
    +  L2MigratorABI,
    +  LivepeerTokenABI,
    +  LivepeerTokenFaucetABI,
    +  mainnetAddress,
    +  mainnetChainId,
    +  MerkleSnapshotABI,
    +  MinterABI,
    +  NodeInterfaceABI,
    +  noopStorage,
    +  PollABI,
    +  PollCreatorABI,
    +  rinkebyAddress,
    +  RoundsManagerABI,
    +  ServiceRegistryABI,
    +  studio,
    +  testnetChainId,
    +  TicketBrokerABI,
    +} from 'livepeer';
    +export type {
    +  Address,
    +  ArbRetryableTx,
    +  Asset,
    +  BondingManager,
    +  ClientConfig,
    +  Controller,
    +  CreateAssetArgs,
    +  CreateStreamArgs,
    +  GetAssetArgs,
    +  GetLivepeerProviderResult,
    +  GetPlaybackInfoArgs,
    +  GetStreamArgs,
    +  GetStreamSessionArgs,
    +  GetStreamSessionsArgs,
    +  Hash,
    +  HlsVideoConfig,
    +  HttpError,
    +  Inbox,
    +  IncorrectChainIdError,
    +  L1Address,
    +  L1BondingManager,
    +  L1LivepeerChain,
    +  L1LivepeerChainId,
    +  L1Migrator,
    +  L2Address,
    +  L2LivepeerChain,
    +  L2LivepeerChainId,
    +  L2LPTGateway,
    +  L2Migrator,
    +  LivepeerAddress,
    +  LivepeerChain,
    +  LivepeerChainId,
    +  LivepeerProvider,
    +  LivepeerProviderConfig,
    +  LivepeerProviderName,
    +  LivepeerToken,
    +  LivepeerTokenFaucet,
    +  MainnetLivepeerChain,
    +  MainnetLivepeerChainId,
    +  MerkleSnapshot,
    +  Metrics,
    +  Minter,
    +  MultistreamTarget,
    +  MultistreamTargetRef,
    +  NodeInterface,
    +  PlaybackInfo,
    +  PlaybackRecord,
    +  Poll,
    +  PollCreator,
    +  RoundsManager,
    +  ServiceRegistry,
    +  Storage,
    +  Stream,
    +  StreamSession,
    +  TestnetLivepeerChain,
    +  TestnetLivepeerChainId,
    +  TicketBroker,
    +  TranscodingProfile,
    +  UpdateAssetArgs,
    +  UpdateStreamArgs,
    +  WatchLivepeerProviderCallback,
    +} from 'livepeer';
    +export {
    +  studioProvider,
    +  type StudioLivepeerProviderConfig,
    +} from 'livepeer/providers/studio';
     export { createReactClient } from './client';
     export type {
       CreateReactClientConfig,
    +  ReactClient,
     } from './client';
     export { VideoPlayer } from './components';

[email protected]

20 Sep 20:45
22aac12

Choose a tag to compare

Minor Changes

  • #44 648ddf5 Thanks @0xcadams! - Feature: Asset Metrics

    There is now support for asset metrics, with start views count being returned
    when metrics have been reported to the correct reporting URL (this is handled in
    @livepeer/react's VideoPlayer).

    const metrics = getAssetMetrics({ assetId });
    
    const viewCount = metrics?.metrics?.[0]?.startViews ?? 0;

Patch Changes

@livepeer/[email protected]

20 Sep 20:45
22aac12

Choose a tag to compare

Minor Changes

  • #44 648ddf5 Thanks @0xcadams! - Feature: Asset Metrics (useAssetMetrics)

    useAssetMetrics hook has been added for fetching asset metrics. This hook will update
    when viewership metrics have been reported to the correct reporting URL (this is handled in
    @livepeer/react's VideoPlayer).

    const { data: metrics } = useAssetMetrics({
      assetId: createdAsset?.id,
      refetchInterval: (metrics) => (!metrics ? 30000 : false),
    });
    
    const viewCount = metrics?.metrics?.[0]?.startViews ?? 0;

Patch Changes

[email protected]

09 Sep 17:19
6417def

Choose a tag to compare

Minor Changes

  • #27 6635d96 Thanks @victorges! - Fix: Improve LivepeerProvider types

    Types are now all documented and extensive for the current version of the Studio
    API which is the base for the LivepeerProvider interface.

    Storage API has also changed slightly, to allow storing an asset in multiple
    different storages in the future. Right now it still only supports IPFS, but the
    interface is now compatible with adding more storages in the future.

    Feature: Multistream

    The LivepeerProvider now supports the multistream feature. To use it simply add
    a multistream field with the desired configuration when creating or updating a
    Stream object.

    const { mutate: createStream } = useCreateStream();
    createStream({
      name,
      multistream: {
        targets: [
          {
            url: 'rtmp://ingest.example.com/rtmp/myStreamKey',
          },
        ],
      },
    });

    Feature: Upload progress

    Track and show upload progress when creating assets through the uploadProgress field in the useCreateAsset hook.

    function App() {
      const createAsset = useCreateAsset();
      return (
        <Button onClick={() => createAsset.mutate({ name, file })}>Create</Button>
        <Text>Upload progress: {100 * createAsset?.uploadProgress ?? 0}%</Text>
      );
    }

@livepeer/[email protected]

09 Sep 17:19
6417def

Choose a tag to compare

Minor Changes

  • #27 6635d96 Thanks @victorges! - Fix: Improve LivepeerProvider types

    Types are now all documented and extensive for the current version of the Studio
    API which is the base for the LivepeerProvider interface.

    Storage API has also changed slightly, to allow storing an asset in multiple
    different storages in the future. Right now it still only supports IPFS, but the
    interface is now compatible with adding more storages in the future.

    Feature: Multistream

    The LivepeerProvider now supports the multistream feature. To use it simply add
    a multistream field with the desired configuration when creating or updating a
    Stream object.

    const { mutate: createStream } = useCreateStream();
    createStream({
      name,
      multistream: {
        targets: [
          {
            url: 'rtmp://ingest.example.com/rtmp/myStreamKey',
          },
        ],
      },
    });

    Feature: Upload progress

    Track and show upload progress when creating assets through the uploadProgress field in the useCreateAsset hook.

    function App() {
      const createAsset = useCreateAsset();
      return (
        <Button onClick={() => createAsset.mutate({ name, file })}>Create</Button>
        <Text>Upload progress: {100 * createAsset?.uploadProgress ?? 0}%</Text>
      );
    }

Patch Changes

[email protected]

08 Sep 17:38
b4d8372

Choose a tag to compare

Minor Changes

  • #26 94fd2c8 Thanks @clacladev! - Feature: added hls.js as a dependency and the creation of an HLS instance to manage a video element and provide HLS and LLHLS support.

    See below for the API changes:

    + export { createNewHls, isHlsSupported } from './video';
    + export type { HlsVideoConfig } from './video';

    The createNewHls can be used to instantiate a new Hls class which connects
    to the provided HTMLMediaElement to stream HLS video.

    if (mediaElement && typeof window !== 'undefined' && isHlsSupported()) {
      const { destroy } = createNewHls(src, mediaElement, hlsConfig);
    }

    The createNewHls function also instantiates reporting to the provider to provide viewership/general metrics.

    This allows a user to build their own custom video player using different frameworks other than React, with easy integration with metrics and HLS out of the box.

Patch Changes

  • #34 d3aa654 Thanks @0xcadams! - Chore: updated zustand and ethers to latest versions.

         "cross-fetch": "^3.1.5",
         "hls.js": "^1.2.1",
         "tus-js-client": "^3.0.0",
    -    "zustand": "^4.0.0"
    +    "zustand": "^4.1.1"
       },
       "devDependencies": {
    -    "@ethersproject/abi": "^5.6.4",
    -    "ethers": "^5.6.9"
    +    "@ethersproject/abi": "^5.7.0",
    +    "ethers": "^5.7.0"
       },

@livepeer/[email protected]

08 Sep 17:38
b4d8372

Choose a tag to compare

Minor Changes

  • #26 94fd2c8 Thanks @clacladev! - Feature: added a VideoPlayer component to provide HLS and LLHLS video streaming.

    See below for the API changes:

    + export { VideoPlayer } from './components';

    The VideoPlayer component uses hls.js under the hood and creates a new HTMLVideoElement and adds event handlers for metrics reporting.

    import { VideoPlayer } from '@livepeer/react';
    
    const playbackId = 'abcde6mykgkvtxav';
    
    function App() {
      return <VideoPlayer playbackId={playbackId} />;
    }

    The VideoPlayer requires a playbackId or src prop to be passed, with the playbackId automatically used to fetch the playback URL from the provider.

Patch Changes

  • #34 d3aa654 Thanks @0xcadams! - Chore: updated react-query, ethers, and wagmi to latest versions.

       "dependencies": {
    -    "@tanstack/query-sync-storage-persister": "4.0.10",
    -    "@tanstack/react-query": "4.1.3",
    -    "@tanstack/react-query-persist-client": "4.0.10",
    +    "@tanstack/query-sync-storage-persister": "4.2.3",
    +    "@tanstack/react-query": "4.2.3",
    +    "@tanstack/react-query-persist-client": "4.2.1",
         "use-sync-external-store": "^1.2.0"
       },
       "devDependencies": {
    -    "@testing-library/react": "^13.3.0",
    +    "@testing-library/react": "^13.4.0",
         "@testing-library/react-hooks": "^8.0.1",
    -    "@types/react": "^18.0.17",
    +    "@types/react": "^18.0.18",
         "@types/react-dom": "^18.0.6",
         "@types/use-sync-external-store": "^0.0.3",
    -    "ethers": "^5.6.9",
    +    "ethers": "^5.7.0",
         "livepeer": "^0.2.2",
         "react": "^18.2.0",
         "react-dom": "^18.2.0",
    -    "wagmi": "^0.6.3"
    +    "wagmi": "^0.6.4"
       },
       "keywords": [
         "dapps",
  • Updated dependencies [d3aa654, 94fd2c8]:

[email protected]

17 Aug 01:17
06521cb

Choose a tag to compare

Patch Changes

  • #5 97c56f6 Thanks @0xcadams! - Updated the default studio API key to use a new, tracked (and rate-limited) version.

    -export const defaultStudioApiKey = '182188f3-3ddf-4dc2-9889-79ecb17a26c9';
    +export const defaultStudioApiKey = '4991930c-f9ae-46a0-a2a8-488c466da778';

    Updated the types on CreateAssetArgs to include ReadStream for node.js environments.

    export type CreateAssetArgs = {
      name: string;
    
    - file: File;
    + file: File | ReadStream;
      };

@livepeer/[email protected]

17 Aug 01:17
06521cb

Choose a tag to compare

Patch Changes

  • #5 97c56f6 Thanks @0xcadams! - Updated the default studio API key to use a new, tracked (and rate-limited) version.

    -export const defaultStudioApiKey = '182188f3-3ddf-4dc2-9889-79ecb17a26c9';
    +export const defaultStudioApiKey = '4991930c-f9ae-46a0-a2a8-488c466da778';

    Updated the types on CreateAssetArgs to include ReadStream for node.js environments.

    export type CreateAssetArgs = {
      name: string;
    
    - file: File;
    + file: File | ReadStream;
      };