@imgix/ix-player-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

imgix Logo

<IxPlayer/>

Downloads Version License

Introduction

<IxPlayer /> is the official imgix React video player component, built on top of our ix-player web component and Media Chrome.

Installation

npm install @imgix/ix-player-react

or

yarn add @imgix/ix-player-react

Usage

import IxPlayer from '@imgix/ix-player-react';

<IxPlayer
  src="my.domain.imgix.video/my-video.mp4?fm=hls"
  type="hls"
/>;

Lazy-loading

Defer loading of IxPlayer by importing from @imgix/ix-player-react/lazy.

import IxPlayer from '@imgix/ix-player-react/lazy';

<IxPlayer
  loading="viewport"
  src="https://assets.imgix.video/videos/alexa_ski_big_bear_mountain.MOV?fm=hls"
  type="hls"
  gifPreview
  posterParams="video-thumbnail-time=2"
/>;

If you are generating your pages with a Node.js server (for example, Next.js), consider using @imgix/ix-player-react/lazy with a blurhash library and imgix Video API's video-generate parameter to generate a placeholder to display during loading.

Docs

API reference lives on Github.

/@imgix/ix-player-react/

    Package Sidebar

    Install

    npm i @imgix/ix-player-react

    Weekly Downloads

    59

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    241 kB

    Total Files

    40

    Last publish

    Collaborators

    • mateo222
    • vuryanh
    • ahmedabu
    • arno_fukuda
    • gsmits
    • atlawrie
    • imgix-company
    • czacharias
    • sherwinski
    • cnoble
    • heyitsbryanm
    • ultimatealf
    • edsz
    • lball