# react-native-corner-video

> RNCornerVideo

Latest version **1.0.2** (published 2022-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-corner-video
pnpm add react-native-corner-video
yarn add react-native-corner-video
bun add react-native-corner-video
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-04-09 |
| First published | 2022-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 106.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Leri Gogsadze |
| Maintainers | l.gogs |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-corner-video
- Repository: https://github.com/Lg0gs/react-native-corner-video
- Homepage: https://github.com/Lg0gs/react-native-corner-video#readme
- Issues: https://github.com/Lg0gs/react-native-corner-video/issues
- npm.io page: https://npm.io/package/react-native-corner-video

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-04-09
- 1.0.1 — 2022-02-25
- 0.1.0 — 2022-02-24

## README

# react-native-corner-video
**Video** component for React Native applications, that extends [react-native-video](https://github.com/react-native-video/react-native-video) library and supports the following options:

 - [x] corner minimization
 - [x] works across the tabs
 - [x] works across the stacked screens
 - [x] starts playng from the current time

You can minimize video via `long press` on it and swipe to any corner

<img src="https://media1.giphy.com/media/iL8ct1yWqcAYWxN6mO/giphy.gif" /> &nbsp; <img src="https://media1.giphy.com/media/3DTnHEQv2r9x0TgpaK/giphy.gif" />

# Instalation

    yarn add react-native-corner-video
or

    npm install react-native-corner-video

> **Note**: 
> You need to install [react-native-video](https://github.com/react-native-video/react-native-video), [react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/docs/#installation) and [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs) libs. They represent native dependencies of the package!!

# Usage
In the **App.js** file, wrap everything in **VideoProvider** component

    import { VideoProvider } from 'react-native-corner-video';
	//
	export default function App() {
	  return (
	    <VideoProvider>
        //
        </VideoProvider>
	  )
	}

Import **VideoWrapper**  where you want to render your video

    import VideoWrapper from  'react-native-corner-video';
    //
    <VideoWrapper
      style={styles.video}
      cornerProps={{
        width: 150,
        height: 100,
        top: 50,
        bottom: 50,
        left: 7
        right: 7
      }}
      videoProps={{
        source: { uri: <video_uri> },
        resizeMode: 'cover',
        controls: true
      }}
    />

# Props

|cornerProps||type|required|desc
|--|--|--|--|--|
|  |width|number|**true**|minimized video width|
|  |height|number|**true**|minimized video width|
||top|number|**true**|distance from top|
||bottom|number|**true**|distance from bottom|
||left|number|**true**|distance from left|
||right|number|**true**|distance from right|
|**videoProps**|[RNVideo](https://github.com/react-native-video/react-native-video#configurable-props) props|VideoProperties|**true**|
|**ref**|||**false**|video ref|
|**onPress**||void|**false**|handles long press event|

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