Skip to content

Releases: livepeer/ui-kit

[email protected]

08 Sep 17:38
b4d8372
Compare
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
Compare
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
Compare
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
Compare
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;
      };

[email protected]

16 Aug 17:18
1354d8d
Compare
Choose a tag to compare

Patch Changes

  • #3 1c38dcd Thanks @0xcadams! - Breaking: removed the term "LPMS" from the library and replaced a "LPMS Provider" with a "Livepeer Provider".

    See below for the API changes:

    import {
      getL2Migrator,
      getLivepeerToken,
      getLivepeerTokenFaucet,
    - getLPMSProvider,
    + getLivepeerProvider,
      getMerkleSnapshot,
      getMinter,
      ...
      updateAsset,
      updateStream,
    - watchLPMSProvider,
    + watchLivepeerProvider,
      ...
    - GetLPMSProviderResult,
    - WatchLPMSProviderCallback,
    + GetLivepeerProviderResult,
    + WatchLivepeerProviderCallback,
      ...
      allChainId,
    - allLPMS,
      arbitrumOneAddress,
      arbitrumRinkebyAddress,
      ArbRetryableTxABI,
      BondingManagerABI,
      ControllerABI,
    - defaultLPMS,
    + defaultStudioApiKey,
      defaultTranscodingProfiles,
      InboxABI,
      L1BondingManagerABI,
      ...
      L2MigratorABI,
      LivepeerTokenABI,
      LivepeerTokenFaucetABI,
    + lpms,
      mainnetAddress,
      mainnetChainId,
      MerkleSnapshotABI,
      ...
      LivepeerAddress,
      LivepeerChain,
      LivepeerChainId,
    - LPMSName,
    + LivepeerProviderName,
      MainnetLivepeerChain,
      MainnetLivepeerChainId,
      TestnetLivepeerChain,
      ...
      L1Migrator,
      L2LPTGateway,
      L2Migrator,
    + LivepeerProvider,
    + LivepeerProviderConfig,
      LivepeerToken,
      LivepeerTokenFaucet,
    - LPMS,
    - LPMSProvider,
      MerkleSnapshot,
      Minter,
      ...
    } from "livepeer";

[email protected]

16 Aug 15:57
6a8b8c0
Compare
Choose a tag to compare

Minor Changes

  • ebd1587 Thanks @0xcadams! - The livepeer package is now comprised of five main groups:

    • actions: functions to write/read from Livepeer Media Server (LPMS) providers and the Livepeer protocol smart contracts
    • client: the singleton LPMS provider with persistence to local storage and global state management
    • constants: constants for the Studio LPMS provider (and future providers) and protocol contract addresses/ABIs/chain IDs
    • errors: custom errors for livepeer.js
    • types: Typescript typings for the LPMS provider interface, Typechain-generated types for protocol contracts, and utility types

    Actions

    + import {
    +   createAsset,
    +   createStream,
    +   getAsset,
    +   getBondingManager,
    +   getContractAddressFromController,
    +   getController,
    +   getL1Migrator,
    +   getL2Migrator,
    +   getLivepeerToken,
    +   getLivepeerTokenFaucet,
    +   getLPMSProvider,
    +   getMerkleSnapshot,
    +   getMinter,
    +   getPollCreator,
    +   getRoundsManager,
    +   getServiceRegistry,
    +   getStream,
    +   getStreamSession,
    +   getStreamSessions,
    +   getTicketBroker,
    +   updateAsset,
    +   updateStream,
    +   watchLPMSProvider,
    + } from 'livepeer';
    +
    + import type {
    +   GetLPMSProviderResult,
    +   WatchLPMSProviderCallback,
    + } from 'livepeer';

    Client

    + import { Client, createClient } from 'livepeer';
    + import type { ClientConfig } from 'livepeer';

    Constants

    + import {
    +   allChainId,
    +   allLPMS,
    +   arbitrumOneAddress,
    +   arbitrumRinkebyAddress,
    +   ArbRetryableTxABI,
    +   BondingManagerABI,
    +   ControllerABI,
    +   defaultLPMS,
    +   defaultTranscodingProfiles,
    +   InboxABI,
    +   L1BondingManagerABI,
    +   L1MigratorABI,
    +   L2LPTGatewayABI,
    +   L2MigratorABI,
    +   LivepeerTokenABI,
    +   LivepeerTokenFaucetABI,
    +   lpms,
    +   mainnetAddress,
    +   mainnetChainId,
    +   MerkleSnapshotABI,
    +   MinterABI,
    +   NodeInterfaceABI,
    +   PollABI,
    +   PollCreatorABI,
    +   rinkebyAddress,
    +   RoundsManagerABI,
    +   ServiceRegistryABI,
    +   studio,
    +   testnetChainId,
    +   TicketBrokerABI,
    + } from 'livepeer';
    +
    + import type {
    +   L1Address,
    +   L1LivepeerChain,
    +   L1LivepeerChainId,
    +   L2Address,
    +   L2LivepeerChain,
    +   L2LivepeerChainId,
    +   LivepeerAddress,
    +   LivepeerChain,
    +   LivepeerChainId,
    +   LPMSName,
    +   MainnetLivepeerChain,
    +   MainnetLivepeerChainId,
    +   TestnetLivepeerChain,
    +   TestnetLivepeerChainId,
    + } from 'livepeer';

    Types

    + import {
    +   ArbRetryableTxFactory,
    +   BondingManagerFactory,
    +   ControllerFactory,
    +   InboxFactory,
    +   L1BondingManagerFactory,
    +   L1MigratorFactory,
    +   L2LPTGatewayFactory,
    +   L2MigratorFactory,
    +   LivepeerTokenFactory,
    +   LivepeerTokenFaucetFactory,
    +   MerkleSnapshotFactory,
    +   MinterFactory,
    +   NodeInterfaceFactory,
    +   PollCreatorFactory,
    +   PollFactory,
    +   RoundsManagerFactory,
    +   ServiceRegistryFactory,
    +   TicketBrokerFactory,
    + } from 'livepeer';
    +
    + import type {
    +   Address,
    +   ArbRetryableTx,
    +   Asset,
    +   BondingManager,
    +   Controller,
    +   CreateAssetArgs,
    +   CreateStreamArgs,
    +   GetAssetArgs,
    +   GetStreamArgs,
    +   GetStreamSessionArgs,
    +   GetStreamSessionsArgs,
    +   Hash,
    +   Inbox,
    +   Ipfs,
    +   L1BondingManager,
    +   L1Migrator,
    +   L2LPTGateway,
    +   L2Migrator,
    +   LivepeerToken,
    +   LivepeerTokenFaucet,
    +   LPMS,
    +   LPMSProvider,
    +   MerkleSnapshot,
    +   Minter,
    +   NodeInterface,
    +   Poll,
    +   PollCreator,
    +   RoundsManager,
    +   ServiceRegistry,
    +   Stream,
    +   StreamSession,
    +   TicketBroker,
    +   TranscodingProfile,
    +   UpdateAssetArgs,
    +   UpdateStreamArgs,
    + } from 'livepeer';

@livepeer/[email protected]

16 Aug 17:18
1354d8d
Compare
Choose a tag to compare

Patch Changes

  • #3 1c38dcd Thanks @0xcadams! - Breaking: removed the term "LPMS" from the library and replaced a "LPMS Provider" with a "Livepeer Provider".

    See below for the API changes:

    - const lpmsProvider = useLPMSProvider<TLPMSProvider>();
    + const livepeerProvider = useLivepeerProvider<TLivepeerProvider>();
    - import { StudioLPMSProvider, studioProvider } from 'livepeer/providers/studio';
    + import {
    +   StudioLivepeerProvider,
    +   studioProvider,
    + } from 'livepeer/providers/studio';
  • Updated dependencies [1c38dcd]:

@livepeer/[email protected]

16 Aug 15:57
6a8b8c0
Compare
Choose a tag to compare

Minor Changes

  • #1 6a8c1f5 Thanks @0xcadams! - The @livepeer/react package is now comprised of three main groups:

    • client: the React-specific LPMS provider wrapped with react-query for query caching/persistence to storage
    • context: React Context for providing the client to React hooks
    • hooks: functions to write/read from Livepeer Media Server (LPMS) providers and the Livepeer protocol smart contracts

    Client

    + import { createReactClient } from '@livepeer/react';
    + import type { CreateReactClientConfig } from '@livepeer/react';

    Context

    + import { Context, LivepeerConfig, useClient } from '@livepeer/react';
    + import type { LivepeerConfigProps } from '@livepeer/react';

    Hooks

    + import {
    +   useAsset,
    +   useBondingManager,
    +   useController,
    +   useCreateAsset,
    +   useCreateStream,
    +   useL1Migrator,
    +   useL2Migrator,
    +   useLivepeerToken,
    +   useLivepeerTokenFaucet,
    +   useLPMSProvider,
    +   useMerkleSnapshot,
    +   useMinter,
    +   usePollCreator,
    +   useRoundsManager,
    +   useServiceRegistry,
    +   useStream,
    +   useStreamSession,
    +   useStreamSessions,
    +   useTicketBroker,
    +   useUpdateAsset,
    +   useUpdateStream,
    + } from '@livepeer/react';

Patch Changes