# mlb-rngvr

> A bridge of react-native with google vr

Latest version **1.0.14** (published 2018-06-20) · 0 weekly downloads

## Install

```sh
npm install mlb-rngvr
pnpm add mlb-rngvr
yarn add mlb-rngvr
bun add mlb-rngvr
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.14 |
| Published | 2018-06-20 |
| First published | 2018-05-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 36.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | minhloc198 |
| Keywords | react-native, video-360, video-vr, 360, gvrsdk |

## Links

- npm: https://www.npmjs.com/package/mlb-rngvr
- Repository: https://github.com/minhlocbong/mlb-rngvr
- Homepage: https://github.com/minhlocbong/mlb-rngvr#readme
- Issues: https://github.com/minhlocbong/mlb-rngvr/issues
- npm.io page: https://npm.io/package/mlb-rngvr

## 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.14 (latest) — 2018-06-20
- 1.0.13 — 2018-06-20
- 1.0.12 — 2018-06-19
- 1.0.11 — 2018-06-19
- 1.0.10 — 2018-06-19
- 1.0.9 — 2018-06-19
- 1.0.8 — 2018-05-25
- 1.0.7 — 2018-05-25
- 1.0.6 — 2018-05-25
- 1.0.5 — 2018-05-14
- 1.0.4 — 2018-05-14
- 1.0.3 — 2018-05-14

## README

# mlb-rngvr

## Getting started

`$ npm install mlb-rngvr --save`

### Mostly automatic installation

`$ react-native link mlb-rngvr`

### Manual installation

#### iOS

1.  In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2.  Go to `node_modules` ➜ `mlb-rngvr` and add `RNGvr.xcodeproj`
3.  In XCode, in the project navigator, select your project. Add `libRNGvr.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4.  Run your project (`Cmd+R`)<

#### Android

1.  Open up `android/app/src/main/java/[...]/MainActivity.java`

- Add `import com.reactlibrary.RNGvrPackage;` to the imports at the top of the file
- Add `new RNGvrPackage()` to the list returned by the `getPackages()` method

2.  Append the following lines to `android/settings.gradle`:
    ```
    include ':mlb-rngvr'
    project(':mlb-rngvr').projectDir = new File(rootProject.projectDir, 	'../node_modules/mlb-rngvr/android')
    ```
3.  Insert the following lines inside the dependencies block in `android/app/build.gradle`:
    ```
      compile project(':mlb-rngvr')
    ```

## Setup

#### iOS

- Copy `./node_modules/mlb-rngvr/pod_post_install.sh` to ios folder

- Create a **Podfile** in ios folder

```shell
target 'myProject' do
  pod 'GVRSDK'
end
```

Still in ios folder install pods locally

```shell
pod install
pod update
```

- Open `myProject.xcworkspace` and under `myProject` > `Build Settings` under `Build Options` set **ENABLE BITCODE** to **NO**

### Android

- Open `./android/app/build.gradle` then set `minSdkVersion 19`

## Usage

```javascript
import { VideoView } from 'mlb-rngvr'

<VideoView
  style={{ height: 300, width: 200 }}
  source={{
    uri: 'https://raw.githubusercontent.com/googlevr/gvr-ios-sdk/master/Samples/VideoWidgetDemo/resources/congo.mp4',
    type: 'mono'
  }}
  displayMode={'embedded'}
  volume={1}
  enableFullscreenButton
  enableCardboardButton
  enableTouchTracking
  hidesTransitionView
  enableInfoButton={false}
  onLoadVideoSuccess={(e) => console.log()}
  onLoadVideoFailed={(e) => console.log()}
/>
```

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