├── .jshintrc
├── .babelrc
├── .npmignore
├── .eslintrc.js
├── assets
└── img
│ ├── back.png
│ ├── pause.png
│ ├── play.png
│ ├── back@2x.png
│ ├── back@3x.png
│ ├── expand.png
│ ├── pause@2x.png
│ ├── pause@3x.png
│ ├── play@2x.png
│ ├── play@3x.png
│ ├── shrink.png
│ ├── volume.png
│ ├── error-icon.png
│ ├── expand@2x.png
│ ├── expand@3x.png
│ ├── shrink@2x.png
│ ├── shrink@3x.png
│ ├── volume@2x.png
│ ├── volume@3x.png
│ ├── error-icon@2x.png
│ ├── error-icon@3x.png
│ ├── loader-icon.png
│ ├── top-vignette.png
│ ├── bottom-vignette.png
│ ├── loader-icon@2x.png
│ ├── loader-icon@3x.png
│ ├── top-vignette@2x.png
│ ├── top-vignette@3x.png
│ ├── bottom-vignette@2x.png
│ └── bottom-vignette@3x.png
├── .gitignore
├── test
└── package.json
├── .prettierrc.js
├── .github
└── workflows
│ └── ci.yml
├── package.json
├── LICENSE
├── VideoPlayer.d.ts
├── CHANGELOG.md
├── README.md
└── VideoPlayer.js
/.jshintrc:
--------------------------------------------------------------------------------
1 | { "esversion": 6 }
2 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | .DS_Store
4 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: "@react-native-community",
4 | };
5 |
--------------------------------------------------------------------------------
/assets/img/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/back.png
--------------------------------------------------------------------------------
/assets/img/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/pause.png
--------------------------------------------------------------------------------
/assets/img/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/play.png
--------------------------------------------------------------------------------
/assets/img/back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/back@2x.png
--------------------------------------------------------------------------------
/assets/img/back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/back@3x.png
--------------------------------------------------------------------------------
/assets/img/expand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/expand.png
--------------------------------------------------------------------------------
/assets/img/pause@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/pause@2x.png
--------------------------------------------------------------------------------
/assets/img/pause@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/pause@3x.png
--------------------------------------------------------------------------------
/assets/img/play@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/play@2x.png
--------------------------------------------------------------------------------
/assets/img/play@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/play@3x.png
--------------------------------------------------------------------------------
/assets/img/shrink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/shrink.png
--------------------------------------------------------------------------------
/assets/img/volume.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/volume.png
--------------------------------------------------------------------------------
/assets/img/error-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/error-icon.png
--------------------------------------------------------------------------------
/assets/img/expand@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/expand@2x.png
--------------------------------------------------------------------------------
/assets/img/expand@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/expand@3x.png
--------------------------------------------------------------------------------
/assets/img/shrink@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/shrink@2x.png
--------------------------------------------------------------------------------
/assets/img/shrink@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/shrink@3x.png
--------------------------------------------------------------------------------
/assets/img/volume@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/volume@2x.png
--------------------------------------------------------------------------------
/assets/img/volume@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/volume@3x.png
--------------------------------------------------------------------------------
/assets/img/error-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/error-icon@2x.png
--------------------------------------------------------------------------------
/assets/img/error-icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/error-icon@3x.png
--------------------------------------------------------------------------------
/assets/img/loader-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/loader-icon.png
--------------------------------------------------------------------------------
/assets/img/top-vignette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/top-vignette.png
--------------------------------------------------------------------------------
/assets/img/bottom-vignette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/bottom-vignette.png
--------------------------------------------------------------------------------
/assets/img/loader-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/loader-icon@2x.png
--------------------------------------------------------------------------------
/assets/img/loader-icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/loader-icon@3x.png
--------------------------------------------------------------------------------
/assets/img/top-vignette@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/top-vignette@2x.png
--------------------------------------------------------------------------------
/assets/img/top-vignette@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/top-vignette@3x.png
--------------------------------------------------------------------------------
/assets/img/bottom-vignette@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/bottom-vignette@2x.png
--------------------------------------------------------------------------------
/assets/img/bottom-vignette@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itsnubix/react-native-video-controls/HEAD/assets/img/bottom-vignette@3x.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | .DS_Store
3 |
4 | # node.js
5 | node_modules/
6 | npm-debug.log
7 |
8 | *.iml
9 | .idea/
10 | .vscode/
11 |
--------------------------------------------------------------------------------
/test/package.json:
--------------------------------------------------------------------------------
1 | {"name":"test","version":"0.0.1","private":true,"scripts":{"start":"node node_modules/react-native/local-cli/cli.js start"}}
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: "all",
6 | };
7 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 | on: [push, pull_request]
3 | jobs:
4 | build:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@v2
8 | - uses: actions/setup-node@v1
9 | - run: npm ci
10 | - run: npm run lint
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-video-controls",
3 | "version": "2.8.1",
4 | "description": "A set of GUI controls for the react-native-video component",
5 | "license": "MIT",
6 | "main": "VideoPlayer.js",
7 | "types": "VideoPlayer.d.ts",
8 | "keywords": [
9 | "react-native",
10 | "react-native-video",
11 | "react video controls",
12 | "react video player"
13 | ],
14 | "scripts": {
15 | "lint": "eslint .",
16 | "test": "echo \"No test specified\" && exit 1"
17 | },
18 | "author": "Nubix (https://github.com/itsnubix)",
19 | "repository": {
20 | "type": "git",
21 | "url": "git@github.com:itsnubix/react-native-video-controls.git"
22 | },
23 | "dependencies": {
24 | "lodash": "^4.16.4"
25 | },
26 | "peerDependencies": {
27 | "react-native": ">=0.46.0",
28 | "react-native-video": ">=2.0.0"
29 | },
30 | "devDependencies": {
31 | "@react-native-community/eslint-config": "^0.0.5",
32 | "eslint": "^6.5.1"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Nubix Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/VideoPlayer.d.ts:
--------------------------------------------------------------------------------
1 | import {Component} from 'react';
2 | import {StyleProp, ViewStyle} from 'react-native';
3 | import Video, {LoadError, VideoProperties} from 'react-native-video';
4 |
5 | interface DuckNavigator {
6 | pop: () => void;
7 | }
8 |
9 | interface VideoPlayerProperties extends VideoProperties {
10 | /** If true, clicking the fullscreen button will toggle the component between cover/contain, set to false if you want to customize fullscreen behaviour */
11 | toggleResizeModeOnFullscreen?: boolean;
12 | /** The amountof time (in milliseconds) to animate the controls in and out. */
13 | controlAnimationTiming?: number;
14 | /** Tapping twice within this amount of time in milliseconds is considered a double tap. Single taps will not be actioned until this time has expired. */
15 | doubleTapTime?: number;
16 | /** Hide controls after X amount of time in milliseconds */
17 | controlTimeout?: number;
18 | /** If > 0, enable live scrubbing when moving the seek bar. The provided value is the minimum time step of the scrubbing in milliseconds. */
19 | scrubbing?: number;
20 | /** Show or hide the controls on first render */
21 | showOnStart?: boolean;
22 | /** React Native StyleSheet object that is appended to the