# the-video

> Video for the-components

Latest version **2.1.1** (published 2019-03-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install the-video
pnpm add the-video
yarn add the-video
bun add the-video
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2019-03-14 |
| First published | 2017-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 8 |
| Unpacked size | 88.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | react-component, the |

## Links

- npm: https://www.npmjs.com/package/the-video
- Repository: https://github.com/the-labo/the-video
- Homepage: https://github.com/the-labo/the-video#readme
- Issues: https://github.com/the-labo/the-video/issues
- npm.io page: https://npm.io/package/the-video

## Dependencies (8)

- [the-icon](https://npm.io/package/the-icon.md) ^4.0.10
- [the-spin](https://npm.io/package/the-spin.md) ^3.1.12
- [the-style](https://npm.io/package/the-style.md) ^2.2.8
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [the-button](https://npm.io/package/the-button.md) ^3.0.36
- [the-condition](https://npm.io/package/the-condition.md) ^3.0.4
- [the-component-util](https://npm.io/package/the-component-util.md) ^3.0.22

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2019-03-14
- 2.1.0 — 2019-02-08
- 2.0.25 — 2019-01-08
- 2.0.24 — 2018-11-17
- 2.0.23 — 2018-11-14
- 2.0.22 — 2018-11-11
- 2.0.21 — 2018-11-05
- 2.0.20 — 2018-11-05
- 2.0.19 — 2018-08-12
- 2.0.18 — 2018-06-18
- 2.0.17 — 2018-06-18
- 2.0.16 — 2018-06-17
- 2.0.15 — 2018-04-06
- 2.0.14 — 2018-03-27
- 2.0.13 — 2018-03-26
- … 23 more at https://npm.io/package/the-video/versions

## README

the-video
==========

<!---
This file is generated by the-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/the-labo/the-video
[bd_travis_url]: http://travis-ci.org/the-labo/the-video
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the-video.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the-video
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the-video.svg?token=
[bd_license_url]: https://github.com/the-labo/the-video/blob/master/LICENSE
[bd_npm_url]: http://www.npmjs.org/package/the-video
[bd_npm_shield_url]: http://img.shields.io/npm/v/the-video.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Video for the-components

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install the-video --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

import React from 'react'
import { TheVideo, TheVideoStyle } from 'the-video'
import { TheIconStyle } from 'the-icon'

const VIDEO_URL = './mov_bbb.mp4'

class ExampleComponent extends React.PureComponent {
  render() {
    const width = 120
    const height = 120
    return (
      <div>
        <TheIconStyle />
        <TheVideoStyle />
        <TheVideo controls {...{ width, height }} src={VIDEO_URL} scale='none' />
        <TheVideo controls {...{ width, height }} src={VIDEO_URL} scale='fill' />
        <TheVideo controls {...{ width, height }} src={VIDEO_URL} scale='fit' />
        <TheVideo controls {...{ width, height }} src={'__invalid_url__'} />
        <TheVideo controls {...{ width, height }} src={VIDEO_URL} scale='fit' asLink />
        <TheVideo controls {...{ width, height }} src={null} scale='fit' />


        <hr />
        <div style={{ width: 120, height: 120, background: '#CCC' }}>
          <TheVideo height="24px" width='33%' src={VIDEO_URL} scale='fill' asLink />
          <TheVideo height="24px" width='33%' src={VIDEO_URL} scale='fill' asLink />
          <TheVideo height="24px" width='33%' src={VIDEO_URL} scale='fill' />
        </div>
      </div>

    )
  }
}

export default ExampleComponent

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.Components.md.hbs" Start -->

<a name="section-doc-guides-03-components-md"></a>

Components
-----------

### TheVideo

Video for the-components

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `asLink` | bool  | Render as link | `false` |
| `height` | union  | Image height | `'auto'` |
| `notFoundMessage` | string  | Message when not found | `'Not Found'` |
| `onError` | func  | Handler for failed event | `null` |
| `onLoad` | func  | Handler for load event | `null` |
| `playsInline` | bool  |  | `false` |
| `resizeInterval` | number  | Interval for resize | `-1` |
| `scale` | enum  | How to scale video | `'fill'` |
| `videoRef` | func  | Handle video ref | `` |
| `width` | union  |  | `'auto'` |
| `onVideo` |   |  | `() => {}` |
| `preload` |   |  | `'metadata'` |

### TheVideoStyle

Style for TheVideo

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `options` | object  | Style options | `{}` |



<!-- Section from "doc/guides/03.Components.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the-video/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

---
_Source: https://npm.io/package/the-video · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
