Skip to content

Releases: livepeer/ui-kit

@livepeer/[email protected]

30 Sep 18:48
cab3394
Compare
Choose a tag to compare

Patch Changes

  • #77 7c3dc0b Thanks @0xcadams! - Fix: added objectFit to <Player /> to apply to the video/poster element, to either be contain or cover depending on the use-case.

@livepeer/[email protected]

30 Sep 15:59
c5208dd
Compare
Choose a tag to compare

Patch Changes

  • #75 73f37ad Thanks @0xcadams! - Fix: fixed too strict types on <Player />, background play/pause click handler not working without a poster element, theme overrides without a global theme, and styling for the container to take up the parent width and maintain aspect ratio.

  • Updated dependencies [73f37ad]:

[email protected]

29 Sep 21:15
eb427d8
Compare
Choose a tag to compare

Major Changes

  • #42 ea9d083 Thanks @0xcadams! - Fix: moved all contract interactions to a separate subpackage, to remove the need for the ethers/wagmi peer dependencies.

    +import {
    +  ArbRetryableTxABI,
    +  BondingManagerABI,
    +  ControllerABI,
    +  InboxABI,
    +  L1BondingManagerABI,
    +  L1MigratorABI,
    +  L2LPTGatewayABI,
    +  L2MigratorABI,
    +  LivepeerTokenABI,
    +  LivepeerTokenFaucetABI,
    +  MerkleSnapshotABI,
    +  MinterABI,
    +  NodeInterfaceABI,
    +  PollABI,
    +  PollCreatorABI,
    +  RoundsManagerABI,
    +  ServiceRegistryABI,
    +  TicketBrokerABI,
    
    +  allChainId,
    +  arbitrumOneAddress,
    +  arbitrumRinkebyAddress,
    +  mainnetAddress,
    +  mainnetChainId,
    +  rinkebyAddress,
    +  testnetChainId,
    
    +  getBondingManager,
    +  getContractAddressFromController,
    +  getController,
    +  getL1Migrator,
    +  getL2Migrator,
    +  getLivepeerToken,
    +  getLivepeerTokenFaucet,
    +  getMerkleSnapshot,
    +  getMinter,
    +  getPollCreator,
    +  getRoundsManager,
    +  getServiceRegistry,
    +  getTicketBroker,
    
    +  ArbRetryableTxFactory,
    +  BondingManagerFactory,
    +  ControllerFactory,
    +  InboxFactory,
    +  L1BondingManagerFactory,
    +  L1MigratorFactory,
    +  L2LPTGatewayFactory,
    +  L2MigratorFactory,
    +  LivepeerTokenFactory,
    +  LivepeerTokenFaucetFactory,
    +  MerkleSnapshotFactory,
    +  MinterFactory,
    +  NodeInterfaceFactory,
    +  PollCreatorFactory,
    +  PollFactory,
    +  RoundsManagerFactory,
    +  ServiceRegistryFactory,
    +  TicketBrokerFactory,
    +} from 'livepeer/contracts';
    
    +import type {
    +  L1Address,
    +  L1LivepeerChain,
    +  L1LivepeerChainId,
    +  L2Address,
    +  L2LivepeerChain,
    +  L2LivepeerChainId,
    +  LivepeerAddress,
    +  LivepeerChain,
    +  LivepeerChainId,
    +  MainnetLivepeerChain,
    +  MainnetLivepeerChainId,
    +  TestnetLivepeerChain,
    +  TestnetLivepeerChainId,
    
    +  ArbRetryableTx,
    +  BondingManager,
    +  Controller,
    +  Inbox,
    +  L1BondingManager,
    +  L1Migrator,
    +  L2LPTGateway,
    +  L2Migrator,
    +  LivepeerToken,
    +  LivepeerTokenFaucet,
    +  MerkleSnapshot,
    +  Minter,
    +  NodeInterface,
    +  Poll,
    +  PollCreator,
    +  RoundsManager,
    +  ServiceRegistry,
    +  TicketBroker,
    +} from 'livepeer/contracts';

Minor Changes

  • #42 ea9d083 Thanks @0xcadams! - Feature: added styling for media player components using @stitches/core and polyfilling using core-js.

    Added a core vanilla JS store based on Zustand, w/ state propagated to/from a media element (see MediaControllerState and MediaControllerStore). Also added more helper functions for validating/constructing media sources and mime types, theming, and browser interactions.

    The following updates were made to package.json:

       },
       "peerDependenciesMeta": {},
       "dependencies": {
    +    "@stitches/core": "^1.2.8",
    +    "core-js": "^3.25.2",
         "cross-fetch": "^3.1.5",
         "hls.js": "^1.2.1",
         "tus-js-client": "^3.0.0",

    The following updates were made to the exports from livepeer:

       TestnetLivepeerChainId,
     } from './constants';
     export { HttpError, IncorrectChainIdError } from './errors';
    +export {
    +  addEventListeners,
    +  canPlayMediaNatively,
    +  createControllerStore,
    +  createNewHls,
    +  createPlayerTheme,
    +  defaultTheme,
    +  getCssText,
    +  getMediaSourceType,
    +  getMetricsReportingUrl,
    +  isHlsSupported,
    +  MetricsStatus,
    +  PlaybackMonitor,
    +  reportMediaMetrics,
    +  styling,
    +} from './media';
    +export type {
    +  AspectRatio,
    +  AudioSrc,
    +  ControlsOptions,
    +  HlsSrc,
    +  HlsVideoConfig,
    +  MediaControllerState,
    +  MediaControllerStore,
    +  PlaybackRecord,
    +  RawMetrics,
    +  Src,
    +  ThemeConfig,
    +  VideoSrc,
    +} from './media';
     export { createStorage, noopStorage } from './storage';
     export type { ClientStorage as Storage } from './storage';
    
     ...
    
       UpdateStreamArgs,
       ViewsMetrics,
     } from './types';
    -export { pick } from './utils';
    -export {
    -  createNewHls,
    -  getMetricsReportingUrl,
    -  isHlsSupported,
    -  MetricsStatus,
    -  PlaybackMonitor,
    -  reportVideoMetrics,
    -} from './video';
    -export type { HlsVideoConfig, PlaybackRecord, RawMetrics } from './video';
    +export { deepMerge, pick } from './utils';

Patch Changes

  • #73 55a9b81 Thanks @0xcadams! - Fix: added media element duration to the metrics reporting plugin.

@livepeer/[email protected]

29 Sep 21:38
fdcd7c6
Compare
Choose a tag to compare

Patch Changes

  • a184505 Thanks @0xcadams! - Fix: hotfix for moving livepeer to dependency array from peer dependencies.

@livepeer/[email protected]

29 Sep 21:15
eb427d8
Compare
Choose a tag to compare

Minor Changes

  • #42 ea9d083 Thanks @0xcadams! - Feature: added a new <Player /> component and deprecated the previous <VideoPlayer />. Also added polyfills using core-js and browserslist to support major global browsers.

    See livepeer for the corresponding core JS updates.

    The following updates were made to the exports from @livepeer/react:

    export {
       arbitrumRinkebyAddress,
       ArbRetryableTxABI,
       BondingManagerABI,
    +  canPlayMediaNatively,
       Client,
       ControllerABI,
    +  createPlayerTheme,
       createStorage,
       defaultStudioApiKey,
    +  defaultTheme,
       defaultTranscodingProfiles,
    +  getCssText,
    +  getMediaSourceType,
       InboxABI,
    +  isHlsSupported,
       L1BondingManagerABI,
       L1MigratorABI,
       L2LPTGatewayABI,
    @@ -28,16 +34,20 @@ export {
       RoundsManagerABI,
       ServiceRegistryABI,
       studio,
    +  styling,
       testnetChainId,
       TicketBrokerABI,
     } from 'livepeer';
     export type {
       Address,
       ArbRetryableTx,
    +  AspectRatio,
       Asset,
    +  AudioSrc,
       BondingManager,
       ClientConfig,
       Controller,
    +  ControlsOptions,
       CreateAssetArgs,
       CreateStreamArgs,
       GetAssetArgs,
    @@ -47,6 +57,7 @@ export type {
       GetStreamSessionArgs,
       GetStreamSessionsArgs,
       Hash,
    +  HlsSrc,
       HlsVideoConfig,
       HttpError,
       Inbox,
    @@ -71,6 +82,8 @@ export type {
       LivepeerTokenFaucet,
       MainnetLivepeerChain,
       MainnetLivepeerChainId,
    +  MediaControllerState,
    +  MediaControllerStore,
       MerkleSnapshot,
       Metrics,
       Minter,
    @@ -83,15 +96,18 @@ export type {
       PollCreator,
       RoundsManager,
       ServiceRegistry,
    +  Src,
       Storage,
       Stream,
       StreamSession,
       TestnetLivepeerChain,
       TestnetLivepeerChainId,
    +  ThemeConfig,
       TicketBroker,
       TranscodingProfile,
       UpdateAssetArgs,
       UpdateStreamArgs,
    +  VideoSrc,
       WatchLivepeerProviderCallback,
     } from 'livepeer';
     export {
    @@ -100,7 +116,34 @@ export {
     } from 'livepeer/providers/studio';
     export { createReactClient } from './client';
     export type { CreateReactClientConfig, ReactClient } from './client';
    -export { VideoPlayer } from './components';
    +export {
    +  ControlsContainer,
    +  FullscreenButton,
    +  MediaControllerProvider,
    +  PlayButton,
    +  Player,
    +  Poster,
    +  Progress,
    +  ThemeProvider,
    +  TimeDisplay,
    +  Title,
    +  useMediaController,
    +  useTheme,
    +  Volume,
    +} from './components';
    +export type {
    +  ControlsContainerProps,
    +  FullscreenButtonProps,
    +  MediaControllerProviderProps,
    +  PlayButtonProps,
    +  PlayerProps,
    +  PosterProps,
    +  ProgressProps,
    +  ThemeProviderProps,
    +  TimeDisplayProps,
    +  TitleProps,
    +  VolumeProps,
    +} from './components';
     export { Context, LivepeerConfig, useClient } from './context';
     export type { LivepeerConfigProps } from './context';
     export {
  • #42 ea9d083 Thanks @0xcadams! - Fix: moved all contract interactions to a separate subpackage, to remove the need for the ethers/wagmi peer dependencies.

    +import {
    +  useBondingManager,
    +  useController,
    +  useL1Migrator,
    +  useL2Migrator,
    +  useLivepeerToken,
    +  useLivepeerTokenFaucet,
    +  useMerkleSnapshot,
    +  useMinter,
    +  usePollCreator,
    +  useRoundsManager,
    +  useServiceRegistry,
    +  useTicketBroker,
    +} from '@livepeer/react/contracts';

Patch Changes

[email protected]

27 Sep 22:48
8d33e48
Compare
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]

27 Sep 22:48
8d33e48
Compare
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
Compare
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
Compare
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
Compare
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