Skip to content

Commit 45a8d63

Browse files
committed
update Readme.md
1 parent ecbb4c2 commit 45a8d63

4 files changed

Lines changed: 60 additions & 26 deletions

File tree

README.md

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
# react-native-video-provider
2-
3-
**One native player. Many surfaces. Zero interruptions.**
1+
<p align="center">
2+
<img src="./docs/react-native-video-provider.png" alt="react-native-video-provider" width="100%" />
3+
</p>
4+
5+
<p align="center">
6+
<a href="https://www.npmjs.com/package/react-native-video-provider"><img src="https://img.shields.io/npm/v/react-native-video-provider.svg" alt="npm version" /></a>
7+
<a href="https://www.npmjs.com/package/react-native-video-provider"><img src="https://img.shields.io/npm/l/react-native-video-provider.svg" alt="license" /></a>
8+
<img src="https://img.shields.io/badge/platform-android%20%7C%20ios-3DDC84" alt="platform" />
9+
<img src="https://img.shields.io/badge/architecture-new-orange" alt="new architecture" />
10+
</p>
11+
12+
<h1 align="center">React Native Video Provider</h1>
13+
<p align="center"><strong>One native player. Many surfaces. Zero interruptions.</strong></p>
14+
15+
<p align="center">
16+
<a href="https://docs.gurdeep.net/package/react-native-video-controller">
17+
<img src="https://img.shields.io/badge/Documentation-1f6feb?style=for-the-badge" alt="Documentation" />
18+
</a>
19+
</p>
420

521
A singleton-engine video library for React Native (Android + iOS, New
622
Architecture). The app owns exactly one native playback engine (ExoPlayer /
@@ -36,6 +52,19 @@ Feed ──▶ Detail ──▶ Fullscreen (rotation unlocked) ──▶ Floatin
3652
See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full design and
3753
[docs/API.md](docs/API.md) for the complete API reference.
3854

55+
## Contents
56+
57+
- [Installation](#installation)
58+
- [Quick start](#quick-start)
59+
- [Surfaces (the core idea)](#surfaces-the-core-idea)
60+
- [Video feed](#video-feed-single-engine-only-the-focused-one-plays)
61+
- [Pausing on focus loss](#pausing-on-focus-loss)
62+
- [State & events](#state--events)
63+
- [Platform setup](#platform-setup)
64+
- [Example app](#example-app)
65+
- [Roadmap](#roadmap)
66+
- [Contributing](#contributing)
67+
3968
## Installation
4069

4170
```sh
@@ -147,6 +176,9 @@ landscape in its Info.plist and forward orientation from the AppDelegate (see
147176
[Platform setup](#ios--fullscreen-rotation)), or the OS won't permit rotation
148177
at all.
149178

179+
<details>
180+
<summary><strong>Full orientation reference</strong> — sensor-driven fullscreen entry, standing locks, and how the two rotation props compose</summary>
181+
150182
To also stop the *inline* video from sensor-rotating with the rest of the app,
151183
set `lockPortrait` on the provider — the app stays portrait and only fullscreen
152184
rotates:
@@ -187,6 +219,8 @@ On iOS this needs the AppDelegate forwarding shown in
187219
[Platform setup](#ios--fullscreen-rotation). Inverted portrait is ignored by
188220
iPhones without a home button (the OS doesn't allow it).
189221

222+
</details>
223+
190224
## Surfaces (the core idea)
191225

192226
`<VideoSurface>` never creates a playerit registers a mount point. The
@@ -314,12 +348,14 @@ func application(_ application: UIApplication,
314348
}
315349
```
316350

317-
**If your app swizzles RN modal orientation.** Some apps override
318-
`RCTModalHostViewController.supportedInterfaceOrientations` to force an
319-
app-wide orientation. That swizzle also applies to this library's fullscreen
320-
host (an RN `Modal`) and will pin it — landscape fullscreen then silently
321-
fails on iOS while working on Android. Route the swizzle through the library
322-
too:
351+
<details>
352+
<summary>If your app swizzles RN modal orientation</summary>
353+
354+
Some apps override `RCTModalHostViewController.supportedInterfaceOrientations`
355+
to force an app-wide orientation. That swizzle also applies to this library's
356+
fullscreen host (an RN `Modal`) and will pin it — landscape fullscreen then
357+
silently fails on iOS while working on Android. Route the swizzle through the
358+
library too:
323359

324360
```swift
325361
extension UIViewController {
@@ -329,6 +365,8 @@ extension UIViewController {
329365
}
330366
```
331367

368+
</details>
369+
332370
**Orientation is app-wide, not per-player.** `VideoOrientation` is the single
333371
authority, so use it for *other* players/screens too rather than patching them
334372
or hand-rolling a second mechanism:
@@ -370,13 +408,18 @@ fullscreen, floating and PiP buttons.
370408

371409
## Roadmap
372410

411+
<details>
412+
<summary>Not yet built — expand for the full list</summary>
413+
373414
- Queue (next/previous/playlist/autoplay)
374415
- Background playback (Android MediaSessionService + notification, iOS remote
375416
commands / lock-screen controls)
376417
- Quality, subtitle and audio-track selection
377418
- Brightness/volume swipe gestures, pinch zoom
378419
- True ahead-of-time preloading (Media3 `PreloadManager`)
379420

421+
</details>
422+
380423
## Contributing
381424

382425
See [CONTRIBUTING.md](CONTRIBUTING.md) and the
752 KB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-video-provider",
3-
"version": "0.6.6",
3+
"version": "0.6.7",
44
"description": "Singleton-engine video library for React Native (one native player, many surfaces)",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",

scripts/postinstall.js

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,18 @@ const force =
1717
process.argv.includes('--force') || process.env.AU_VIDEO_BANNER === '1';
1818

1919
const BANNER = `
20-
++
21-
+++ +++ +++++++++++ ++
22-
++++++++++++++ ++++++++++ ++++++++++++++ +++ +++++++ ++ +++
23-
++ +++ +++ ++++++++++++ +++ +++++ ++++ +++++++ ++++ +++++++ ++ +++
24-
++ +++ +++ ++++ +++ +++++++++++++ ++++ +++++ ++++ +++++ +++++++ ++ +++++++++++
25-
+++ +++ +++ ++++ ++++ +++ +++++++ +++++++ +++++++++ +++++++++ ++++ ++++
26-
++++ +++ +++ ++++++++++ ++++++ +++ ++++++ +++++ +++ ++ +++ +++
27-
+++ ++ +++ ++++ +++ +++ ++++++++ ++++ ++++ +++ ++++ +++ +++ +++
28-
++++ ++++ +++ +++ ++ +++++ ++ +++ ++++
29-
+++++++ ++++ ++ ++++++ ++++++++++
30-
++++ ++++ + +++ ++++ + +++++++++++
31-
+++ +++ ++++ +++++ ++++ +++ +++ ++++ ++++ +++
32-
++++++++ ++ ++ ++ +++ + ++
33-
`;
20+
________ .___ _________.__ .__
21+
/ _____/ __ _________ __| _/____ ____ ______ / _____/|__| ____ ____ | |__
22+
/ \ ___| | \_ __ \/ __ |/ __ \_/ __ \\____ \ \_____ \ | |/ \ / ___\| | \
23+
\ \_\ \ | /| | \/ /_/ \ ___/\ ___/| |_> > / \| | | \/ /_/ > Y \
24+
\______ /____/ |__| \____ |\___ >\___ > __/ /_______ /|__|___| /\___ /|___| /
25+
\/ \/ \/ \/|__| \/ \//_____/ \/
26+
`;
3427

3528
try {
3629
const quiet = process.env.CI || process.env.npm_config_loglevel === 'silent';
3730
const show = force || (!quiet && process.stdout && process.stdout.isTTY);
3831
if (show) {
39-
// Colorize only in a real terminal — under Gradle/CI (--force, not a TTY)
40-
// stay plain so the log doesn't fill with raw escape codes.
4132
const color = process.stdout && process.stdout.isTTY;
4233
const cyan = color ? '\x1b[36m' : '';
4334
const dim = color ? '\x1b[2m' : '';

0 commit comments

Comments
 (0)