├── .all-contributorsrc ├── .deepsource.toml ├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── release-drafter.yml ├── starrycake.yml └── workflows │ ├── codesee-arch-diagram.yml │ ├── nodejs.yml │ └── release-drafter.yml ├── .gitignore ├── .gitpod.yml ├── .husky ├── pre-commit └── pre-push ├── .lintstagedrc.json ├── .npmignore ├── .prettierignore ├── .prettierrc ├── .remarkignore ├── .swcrc ├── .typo-ci.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── babel.config.js ├── dist ├── LICENSE ├── README.md ├── esm │ ├── index.d.ts │ ├── index.js │ └── index.mjs ├── index.d.ts ├── index.js ├── package.json ├── plyr.css ├── system │ ├── index.development.js │ └── index.production.js └── umd │ ├── index.development.js │ └── index.production.js ├── example ├── nextjs │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── api │ │ │ └── hello.js │ │ └── index.js │ ├── public │ │ ├── favicon.ico │ │ └── vercel.svg │ ├── src │ │ ├── contents.json │ │ └── video-list.jsx │ ├── styles │ │ └── globals.css │ └── yarn.lock └── react │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src │ ├── audio-player │ │ └── custom-audio-player.tsx │ ├── hls-player │ │ └── custom-hls-player.tsx │ ├── index.css │ ├── main.tsx │ ├── video-list │ │ ├── contents.json │ │ └── video-list.tsx │ └── vite-env.d.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── yarn.lock ├── jest.config.ts ├── package-lock.json ├── package.json ├── rollup.config.js ├── sonar-project.properties ├── sourcelevel.yml ├── src ├── index.tsx └── types.d.ts ├── tests └── Plyr.test.tsx └── tsconfig.json /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "plyr-react", 3 | "projectOwner": "chintan9", 4 | "repoType": "github", 5 | "repoHost": "https://github.com", 6 | "files": [ 7 | "README.md" 8 | ], 9 | "imageSize": 100, 10 | "commit": true, 11 | "commitConvention": "none", 12 | "contributors": [ 13 | { 14 | "login": "iwatakeshi", 15 | "name": "Takeshi", 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/1505448?v=4", 17 | "profile": "http://www.iwatakeshi.com", 18 | "contributions": [ 19 | "ideas", 20 | "question", 21 | "translation", 22 | "userTesting", 23 | "example" 24 | ] 25 | }, 26 | { 27 | "login": "mnervik", 28 | "name": "mnervik", 29 | "avatar_url": "https://avatars1.githubusercontent.com/u/15329600?v=4", 30 | "profile": "https://github.com/mnervik", 31 | "contributions": [ 32 | "test", 33 | "userTesting" 34 | ] 35 | }, 36 | { 37 | "login": "amirHossein-Ebrahimi", 38 | "name": "Amir.H Ebrahimi", 39 | "avatar_url": "https://avatars0.githubusercontent.com/u/23579958?v=4&s=100", 40 | "profile": "https://ahimico.github.io/", 41 | "contributions": [ 42 | "infra", 43 | "doc", 44 | "tool", 45 | "maintenance", 46 | "review", 47 | "question", 48 | "code", 49 | "test" 50 | ] 51 | } 52 | ], 53 | "contributorsPerLine": 7, 54 | "skipCi": true 55 | } 56 | -------------------------------------------------------------------------------- /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = ["*/test/**"] 4 | 5 | exclude_patterns = [".*/**"] 6 | 7 | [[analyzers]] 8 | name = "javascript" 9 | enabled = true 10 | 11 | [analyzers.meta] 12 | environment = [ 13 | "nodejs", 14 | "jest" 15 | ] 16 | plugins = ["react"] 17 | style_guide = "airbnb" 18 | dialect = "typescript" 19 | 20 | [[transformers]] 21 | name = "prettier" 22 | enabled = true 23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = false 8 | insert_final_newline = false -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .git 2 | .npmrc 3 | .yarnrc 4 | build 5 | dist 6 | node_modules 7 | coverage 8 | config 9 | styleguide 10 | example 11 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "ecmaVersion": 2018, 5 | "sourceType": "module", 6 | "ecmaFeatures": { 7 | "jsx": true 8 | } 9 | }, 10 | "env": { 11 | "browser": true, 12 | "shared-node-browser": true, 13 | "node": true, 14 | "es6": true 15 | }, 16 | "extends": [ 17 | "plugin:react/recommended", 18 | "plugin:@typescript-eslint/recommended", 19 | "plugin:prettier/recommended", 20 | "eslint:recommended", 21 | "prettier", 22 | "plugin:prettier/recommended", 23 | "plugin:react-hooks/recommended", 24 | "plugin:import/errors", 25 | "plugin:import/warnings" 26 | ], 27 | "plugins": [ 28 | "@typescript-eslint", 29 | "react", 30 | "prettier", 31 | "react-hooks", 32 | "import", 33 | "jest" 34 | ], 35 | "rules": { 36 | "eqeqeq": "error", 37 | "no-var": "error", 38 | "prefer-const": "error", 39 | "curly": ["warn", "multi-line", "consistent"], 40 | "no-console": "off", 41 | "import/no-unresolved": [ 42 | "warn", 43 | { 44 | "commonjs": true, 45 | "amd": true 46 | } 47 | ], 48 | "import/export": "error", 49 | "@typescript-eslint/no-duplicate-imports": ["error"], 50 | "@typescript-eslint/explicit-module-boundary-types": "off", 51 | "@typescript-eslint/no-unused-vars": [ 52 | "warn", 53 | { 54 | "argsIgnorePattern": "^_", 55 | "varsIgnorePattern": "^_" 56 | } 57 | ], 58 | "@typescript-eslint/no-use-before-define": "off", 59 | "@typescript-eslint/no-empty-function": "off", 60 | "@typescript-eslint/no-empty-interface": "off", 61 | "@typescript-eslint/no-explicit-any": "off", 62 | "jest/consistent-test-it": [ 63 | "error", 64 | { 65 | "fn": "it", 66 | "withinDescribe": "it" 67 | } 68 | ], 69 | "import/order": [ 70 | "error", 71 | { 72 | "alphabetize": { 73 | "order": "asc", 74 | "caseInsensitive": true 75 | }, 76 | "groups": [ 77 | "builtin", 78 | "external", 79 | "internal", 80 | "parent", 81 | "sibling", 82 | "index", 83 | "object" 84 | ], 85 | "newlines-between": "never", 86 | "pathGroups": [ 87 | { 88 | "pattern": "react", 89 | "group": "builtin", 90 | "position": "before" 91 | } 92 | ], 93 | "pathGroupsExcludedImportTypes": ["builtin"] 94 | } 95 | ], 96 | "react/jsx-uses-react": "off", 97 | "react/react-in-jsx-scope": "off", 98 | "sort-imports": [ 99 | "error", 100 | { 101 | "ignoreDeclarationSort": true 102 | } 103 | ] 104 | }, 105 | "settings": { 106 | "react": { 107 | "version": "detect" 108 | }, 109 | "import/extensions": [".js", ".jsx", ".ts", ".tsx"], 110 | "import/parsers": { 111 | "@typescript-eslint/parser": [".js", ".jsx", ".ts", ".tsx"] 112 | } 113 | }, 114 | "globals": { 115 | "__DEV__": true 116 | }, 117 | "overrides": [ 118 | { 119 | "files": ["src"], 120 | "parserOptions": { 121 | "project": "./tsconfig.json" 122 | } 123 | }, 124 | { 125 | "files": ["tests/**/*.tsx"], 126 | "env": { 127 | "jest/globals": true 128 | } 129 | }, 130 | { 131 | "files": ["./*.js"], 132 | "rules": { 133 | "@typescript-eslint/no-var-requires": "off" 134 | } 135 | } 136 | ] 137 | } 138 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | **Describe the bug** 10 | A clear and concise description of what the bug is. 11 | 12 | **To Reproduce** 13 | Steps to reproduce the behavior: 14 | 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | 28 | - OS: [e.g. iOS] 29 | - Browser [e.g. chrome, safari] 30 | - Version [e.g. 22] 31 | 32 | **Smartphone (please complete the following information):** 33 | 34 | - Device: [e.g. iPhone6] 35 | - OS: [e.g. iOS8.1] 36 | - Browser [e.g. stock browser, safari] 37 | - Version [e.g. 22] 38 | 39 | **Additional context** 40 | Add any other context about the problem here. 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Describe alternatives you've considered** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Additional context** 19 | Add any other context or screenshots about the feature request here. 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | time: "09:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | template: | 2 | ## What’s Changed 3 | 4 | $CHANGES 5 | -------------------------------------------------------------------------------- /.github/starrycake.yml: -------------------------------------------------------------------------------- 1 | ## MASTER APPLICATION CONFIG 2 | starrycake: 3 | # if false, application's every feature won't work 4 | moduleSwitch: true 5 | 6 | ## ASSIGNER 7 | assigner: 8 | # if false, ASSIGNER module won't work 9 | moduleSwitch: true 10 | # assign on new issue? 11 | assignOnNewIssue: true 12 | # assign on new pull request? 13 | assignOnNewPullRequest: true 14 | # review on new pull request? 15 | reviewOnNewPullRequest: true 16 | 17 | ## DELETE-MERGED-BRANCH 18 | deletebranch: 19 | # if false, DELETE-MERGED-BRANCH module won't work 20 | moduleSwitch: true 21 | # list of branches that should not be automatically deleted after a merge. Wildcards supported. 22 | exclude: 23 | - dev-* 24 | # whether or not a branch should be deleted if PR is closed without merging 25 | delete_closed_pr: true 26 | 27 | ## REMINDER 28 | reminder: 29 | # if false, REMINDER module won't work 30 | moduleSwitch: true 31 | 32 | ## RESPONDER 33 | responder: 34 | # if false, RESPONDER module won't work 35 | moduleSwitch: true 36 | # respond on new issue? 37 | respondOnNewIssue: true 38 | # respond on new pull request? 39 | respondOnNewPullRequest: true 40 | # respond on my new issue? 41 | respondOnMyIssue: false 42 | # respond on my new pull request? 43 | respondOnMyPullRequest: false 44 | # issue respond message string 45 | issueRespond: Thanks for opening this issue! 46 | # pull request respond message string 47 | pullRequestRespond: Thanks for opening this pull request! 48 | 49 | ## STALE 50 | stale: 51 | # if false, STALE module won't work 52 | moduleSwitch: true 53 | # Number of days of inactivity before an Issue or Pull Request becomes stale 54 | daysUntilStale: 60 55 | # Number of days of inactivity before a stale Issue or Pull Request is closed. If disabled, issues still need to be closed manually, but will remain marked as stale. 56 | daysUntilClose: 7 57 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 58 | exemptLabels: 59 | - pinned 60 | - security 61 | # Label to use when marking as stale 62 | staleLabel: wontfix 63 | # Comment to post when marking as stale. Set to `false` to disable 64 | markComment: > 65 | This issue has been marked as stale. It will be closed if no further activity occurs. 66 | # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable 67 | closeComment: false 68 | 69 | ## TO-DO 70 | todo: 71 | # if false, TO-DO module won't work 72 | moduleSwitch: true 73 | # If `true`, it'll assign whoever pushed the code. If a string, it'll assign that user by username. `false` to not assign anyone. 74 | autoAssign: true 75 | # The keyword(s) to use to generate issue titles 76 | keyword: ["@todo", "TODO"] 77 | # If this is in the line right after the main keyword, it will become the generated issue body. 78 | bodyKeyword: ["@body", "BODY"] 79 | # The number of lines of code to show, starting from the keyword. 80 | blobLines: 5 81 | # Should the keyword be case sensitive? 82 | caseSensitive: false 83 | # If true, add the `todo` label. If false, don't add any label.You can also give it a label name or an array of label names. 84 | label: true 85 | # If an issue already exists and is closed, reopen it. If set to false, no new issue will be created. 86 | reopenClosed: true 87 | # Exclude certain files and/or directories. Should be a valid regular expression. 88 | exclude: null 89 | 90 | ## TRIAGE-NEW-ISSUES 91 | triage: 92 | # if false, TRIAGE-NEW-ISSUES module won't work 93 | moduleSwitch: true 94 | # the label name triage module uses 95 | triageLabel: triage 96 | 97 | ## UNFURL 98 | unfurl: 99 | # if false, UNFURL module won't work 100 | moduleSwitch: true 101 | -------------------------------------------------------------------------------- /.github/workflows/codesee-arch-diagram.yml: -------------------------------------------------------------------------------- 1 | # This workflow was added by CodeSee. Learn more at https://codesee.io/ 2 | # This is v2.0 of this workflow file 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request_target: 8 | types: [opened, synchronize, reopened] 9 | 10 | name: CodeSee 11 | 12 | permissions: read-all 13 | 14 | jobs: 15 | codesee: 16 | runs-on: ubuntu-latest 17 | continue-on-error: true 18 | name: Analyze the repo with CodeSee 19 | steps: 20 | - uses: Codesee-io/codesee-action@v2 21 | with: 22 | codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ${{ matrix.os }} 8 | strategy: 9 | matrix: 10 | os: [ubuntu-latest, macos-latest, windows-latest] 11 | node-version: [20.x, 22.x, 24.x] 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Use Node.js ${{ matrix.node-version }} 16 | uses: actions/setup-node@v3 17 | with: 18 | node-version: ${{ matrix.node-version }} 19 | - name: npm install, build, and test 20 | run: | 21 | npm install -g npm@9 22 | npm ci 23 | npm run build --if-present 24 | npm run test 25 | env: 26 | CI: true 27 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - master 8 | tags: 9 | - "*" 10 | 11 | jobs: 12 | update_release_draft: 13 | runs-on: ubuntu-latest 14 | steps: 15 | # Drafts your next Release notes as Pull Requests are merged into "master" 16 | - name: Release Drafter 17 | uses: release-drafter/release-drafter@v5.6.1 18 | 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | 22 | - name: ChangeCast 23 | uses: palmerhq/changecast@v1.0.0 24 | 25 | - name: Changelog Generator 26 | uses: heinrichreimer/github-changelog-generator-action@v2.1.1 27 | with: 28 | token: ${{ secrets.GITHUB_TOKEN }} 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # See https://help.github.com/ignore-files/ for more about ignoring files. 3 | 4 | # dependencies 5 | 6 | # builds 7 | build 8 | .rpt2_cache 9 | 10 | # misc 11 | .DS_Store 12 | .env.local 13 | .env.development.local 14 | .env.test.local 15 | .env.production.local 16 | 17 | # Snowpack dependency directory (https://snowpack.dev/) 18 | web_modules/ 19 | .parcel-cache 20 | out 21 | 22 | # yarn v2 23 | .yarn/cache 24 | .yarn/unplugged 25 | .yarn/build-state.yml 26 | .yarn/install-state.gz 27 | .pnp.* 28 | 29 | # Created by https://www.toptal.com/developers/gitignore/api/react,node 30 | 31 | # Edit at https://www.toptal.com/developers/gitignore?templates=react,node 32 | 33 | ### Node ### 34 | 35 | # Logs 36 | logs 37 | *.log 38 | npm-debug.log* 39 | yarn-debug.log* 40 | yarn-error.log* 41 | lerna-debug.log* 42 | 43 | # Diagnostic reports (https://nodejs.org/api/report.html) 44 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 45 | 46 | # Runtime data 47 | pids 48 | *.pid 49 | *.seed 50 | *.pid.lock 51 | 52 | # Directory for instrumented libs generated by jscoverage/JSCover 53 | lib-cov 54 | 55 | # Coverage directory used by tools like istanbul 56 | coverage 57 | *.lcov 58 | 59 | # nyc test coverage 60 | .nyc_output 61 | 62 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 63 | .grunt 64 | 65 | # Bower dependency directory (https://bower.io/) 66 | bower_components 67 | 68 | # node-waf configuration 69 | .lock-wscript 70 | 71 | # Compiled binary addons (https://nodejs.org/api/addons.html) 72 | build/Release 73 | 74 | # Dependency directories 75 | node_modules/ 76 | jspm_packages/ 77 | 78 | # TypeScript v1 declaration files 79 | typings/ 80 | 81 | # TypeScript cache 82 | *.tsbuildinfo 83 | 84 | # Optional npm cache directory 85 | .npm 86 | 87 | # Optional eslint cache 88 | .eslintcache 89 | 90 | # Microbundle cache 91 | .rpt2_cache/ 92 | .rts2_cache_cjs/ 93 | .rts2_cache_es/ 94 | .rts2_cache_umd/ 95 | 96 | # Optional REPL history 97 | .node_repl_history 98 | 99 | # Output of 'npm pack' 100 | *.tgz 101 | 102 | # Yarn Integrity file 103 | .yarn-integrity 104 | 105 | # dotenv environment variables file 106 | .env 107 | .env.test 108 | 109 | # parcel-bundler cache (https://parceljs.org/) 110 | .cache 111 | 112 | # Next.js build output 113 | .next 114 | 115 | # Nuxt.js build / generate output 116 | .nuxt 117 | 118 | # Gatsby files 119 | .cache/ 120 | 121 | # Comment in the public line in if your project uses Gatsby and not Next.js 122 | 123 | # https://nextjs.org/blog/next-9-1#public-directory-support 124 | 125 | # public 126 | 127 | # vuepress build output 128 | .vuepress/dist 129 | 130 | # Serverless directories 131 | .serverless/ 132 | 133 | # FuseBox cache 134 | .fusebox/ 135 | 136 | # DynamoDB Local files 137 | .dynamodb/ 138 | 139 | # TernJS port file 140 | .tern-port 141 | 142 | # Stores VSCode versions used for testing VSCode extensions 143 | .vscode-test 144 | 145 | ### react ### 146 | 147 | .DS_* 148 | **/*.backup.* 149 | **/*.back.* 150 | node_modules 151 | *.sublime* 152 | psd 153 | thumb 154 | sketch 155 | 156 | # End of https://www.toptal.com/developers/gitignore/api/react,node -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - init: npm install && npm run build 3 | command: npm run start 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run eslint && npm run build && npm test 5 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "package.json": "sort-package-json", 3 | "*": "prettier --write --ignore-unknown", 4 | "*.{ts,tsx}": ["eslint --fix", "prettier --write"] 5 | } 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | ._* 3 | .DS_Store 4 | .git 5 | .gitlab-ci* 6 | .hg 7 | .npmrc 8 | .lock-wscript 9 | .svn 10 | .wafpickle-* 11 | .travis.yml 12 | .editorconfig 13 | .eslint* 14 | .yarnrc 15 | 16 | config.gypi 17 | CVS 18 | npm-debug.log 19 | 20 | yarn-debug.log* 21 | yarn-error.log* 22 | default.config 23 | rollup.config.js 24 | 25 | 26 | docker* 27 | Docker* 28 | 29 | coverage 30 | config 31 | demo 32 | public 33 | src 34 | scripts 35 | styleguide* 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | **/.svn 3 | **/.hg 4 | **/node_modules 5 | **/dist -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": false, 4 | "tabWidth": 2, 5 | "trailingComma": "es5", 6 | "printWidth": 80, 7 | "quoteProps": "as-needed", 8 | "jsxSingleQuote": false, 9 | "bracketSpacing": true, 10 | "bracketSameLine": true, 11 | "arrowParens": "always", 12 | "endOfLine": "lf", 13 | "overrides": [ 14 | { 15 | "files": "README.md", 16 | "options": { 17 | "semi": false 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.remarkignore: -------------------------------------------------------------------------------- 1 | .github 2 | .CHANGELOG.md -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "target": "es5", 4 | "parser": { 5 | "syntax": "typescript", 6 | "tsx": true 7 | }, 8 | "transform": { 9 | "react": { 10 | "runtime": "automatic", 11 | "pragma": "React.createElement", 12 | "pragmaFrag": "React.Fragment", 13 | "throwIfNamespace": true, 14 | "useBuiltins": true 15 | } 16 | } 17 | }, 18 | "sourceMaps": true 19 | } 20 | -------------------------------------------------------------------------------- /.typo-ci.yml: -------------------------------------------------------------------------------- 1 | dictionaries: 2 | - en 3 | - en_GB 4 | 5 | # Any files/folders we should ignore? 6 | excluded_files: 7 | - "vendor/**/*" 8 | - "node_modules/**/*" 9 | - "*.key" 10 | - "*.enc" 11 | - "*.min.css" 12 | - "*.css.map" 13 | - "*.min.js" 14 | - "*.js.map" 15 | - "*.mk" 16 | - "package-lock.json" 17 | - "yarn.lock" 18 | - "Gemfile.lock" 19 | - ".typo-ci.yml" 20 | - "/docz" 21 | 22 | # Any typos we should ignore? 23 | excluded_words: 24 | - typoci 25 | - Plyr 26 | - npmrc 27 | - plyr 28 | - esw 29 | - seektime 30 | - iwatakeshi 31 | - svgr 32 | - plugin-proposal-nullish-coalescing-operator 33 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [v.5.0.2](https://github.com/chintan9/plyr-react/tree/v5.0.2) (2022-05-25) 4 | 5 | - Fix build issues. 6 | 7 | ## [v.5.0.0](https://github.com/chintan9/plyr-react/tree/v5.0.0) (2022-05-25) 8 | 9 | - Add UMD and SystemJS builds for CDN. 10 | > So you can use it in single spa for example. 11 | 12 | ```html 13 | 23 | ``` 24 | 25 | - The path for an import of css styles has been changed. 26 | 27 | ```diff 28 | - import "plyr-react/dist/plyr.css" 29 | + import "plyr-react/plyr.css" 30 | ``` 31 | 32 | - Optimize the core buld process and reduced the build time up to 10 seconds 33 | - Remove redundant stuff from the released plyr-react's package.json so there will be no underised side efffect 34 | 35 | ## [v4.0.0](https://github.com/chintan9/plyr-react/tree/v4.0.0) (2022-05-02) 36 | 37 | - Implement `usePlyr` Hook and make the customization more easier 38 | - Integrate custom `useHLS` Hook make the seamless HLS integration possible. 39 | 40 | ## [v3.0.5](https://github.com/chintan9/plyr-react/tree/v3.0.5) (2020-10-07) 41 | 42 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v3.0.4...v3.0.5) 43 | 44 | **Closed issues:** 45 | 46 | - Using ref-property [\#339](https://github.com/chintan9/plyr-react/issues/339) 47 | 48 | **Merged pull requests:** 49 | 50 | - Update release-drafter.yml [\#374](https://github.com/chintan9/plyr-react/pull/374) ([chintan9](https://github.com/chintan9)) 51 | - Add changelog [\#373](https://github.com/chintan9/plyr-react/pull/373) ([chintan9](https://github.com/chintan9)) 52 | - Update release-drafter.yml [\#372](https://github.com/chintan9/plyr-react/pull/372) ([chintan9](https://github.com/chintan9)) 53 | - Create Build.yml [\#371](https://github.com/chintan9/plyr-react/pull/371) ([chintan9](https://github.com/chintan9)) 54 | - Fix forward ref again [\#370](https://github.com/chintan9/plyr-react/pull/370) ([iwatakeshi](https://github.com/iwatakeshi)) 55 | - Replace memo with forwardRef [\#355](https://github.com/chintan9/plyr-react/pull/355) ([iwatakeshi](https://github.com/iwatakeshi)) 56 | 57 | ## [v3.0.4](https://github.com/chintan9/plyr-react/tree/v3.0.4) (2020-10-05) 58 | 59 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v3.0.3...v3.0.4) 60 | 61 | **Merged pull requests:** 62 | 63 | - Bump jest from 26.1.0 to 26.4.2 [\#365](https://github.com/chintan9/plyr-react/pull/365) ([dependabot[bot]](https://github.com/apps/dependabot)) 64 | 65 | ## [v3.0.3](https://github.com/chintan9/plyr-react/tree/v3.0.3) (2020-10-02) 66 | 67 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v3.0.2...v3.0.3) 68 | 69 | ## [v3.0.2](https://github.com/chintan9/plyr-react/tree/v3.0.2) (2020-10-01) 70 | 71 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v3.0.1...v3.0.2) 72 | 73 | **Merged pull requests:** 74 | 75 | - docs: add iamshouvikmitra as a contributor [\#351](https://github.com/chintan9/plyr-react/pull/351) ([allcontributors[bot]](https://github.com/apps/allcontributors)) 76 | - docs: add mnervik as a contributor [\#350](https://github.com/chintan9/plyr-react/pull/350) ([allcontributors[bot]](https://github.com/apps/allcontributors)) 77 | - docs: add iwatakeshi as a contributor [\#343](https://github.com/chintan9/plyr-react/pull/343) ([allcontributors[bot]](https://github.com/apps/allcontributors)) 78 | - docs: add iamshouvikmitra as a contributor [\#341](https://github.com/chintan9/plyr-react/pull/341) ([allcontributors[bot]](https://github.com/apps/allcontributors)) 79 | - add all-contributors [\#340](https://github.com/chintan9/plyr-react/pull/340) ([chintan9](https://github.com/chintan9)) 80 | - Create stale.yml [\#338](https://github.com/chintan9/plyr-react/pull/338) ([chintan9](https://github.com/chintan9)) 81 | - Create greetings.yml [\#337](https://github.com/chintan9/plyr-react/pull/337) ([chintan9](https://github.com/chintan9)) 82 | 83 | ## [v3.0.1](https://github.com/chintan9/plyr-react/tree/v3.0.1) (2020-09-30) 84 | 85 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v3.0.0...v3.0.1) 86 | 87 | **Closed issues:** 88 | 89 | - Convert to Typescript to aid intellisence and provide type support [\#308](https://github.com/chintan9/plyr-react/issues/308) 90 | - Convert project to TypeScript [\#261](https://github.com/chintan9/plyr-react/issues/261) 91 | - Typescript support [\#201](https://github.com/chintan9/plyr-react/issues/201) 92 | 93 | **Merged pull requests:** 94 | 95 | - add typings [\#334](https://github.com/chintan9/plyr-react/pull/334) ([chintan9](https://github.com/chintan9)) 96 | 97 | ## [v3.0.0](https://github.com/chintan9/plyr-react/tree/v3.0.0) (2020-09-25) 98 | 99 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v2.2.0...v3.0.0) 100 | 101 | **Security fixes:** 102 | 103 | - \[Security\] Bump http-proxy from 1.18.0 to 1.18.1 [\#305](https://github.com/chintan9/plyr-react/pull/305) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 104 | - \[Security\] Bump markdown-to-jsx from 6.11.0 to 6.11.4 [\#304](https://github.com/chintan9/plyr-react/pull/304) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 105 | - \[Security\] Bump elliptic from 6.5.2 to 6.5.3 [\#276](https://github.com/chintan9/plyr-react/pull/276) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 106 | - \[Security\] Bump lodash from 4.17.15 to 4.17.19 [\#268](https://github.com/chintan9/plyr-react/pull/268) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 107 | - \[Security\] Bump websocket-extensions from 0.1.3 to 0.1.4 [\#236](https://github.com/chintan9/plyr-react/pull/236) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 108 | - \[Security\] Bump acorn from 6.4.0 to 6.4.1 [\#166](https://github.com/chintan9/plyr-react/pull/166) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 109 | 110 | **Closed issues:** 111 | 112 | - Could you add API to re-render the component if passing new props like `sources` to component? [\#215](https://github.com/chintan9/plyr-react/issues/215) 113 | - React Player Project [\#212](https://github.com/chintan9/plyr-react/issues/212) 114 | - Unsafe attempt to load URLDomains, protocols and ports must match. [\#183](https://github.com/chintan9/plyr-react/issues/183) 115 | - Add npm package install instructions on README [\#136](https://github.com/chintan9/plyr-react/issues/136) 116 | - How to run the methods like play, pause, etc.? [\#128](https://github.com/chintan9/plyr-react/issues/128) 117 | 118 | **Merged pull requests:** 119 | 120 | - Bump eslint-plugin-react-hooks from 4.0.8 to 4.1.2 [\#332](https://github.com/chintan9/plyr-react/pull/332) ([dependabot[bot]](https://github.com/apps/dependabot)) 121 | - Bump @babel/plugin-proposal-object-rest-spread from 7.10.4 to 7.11.0 [\#322](https://github.com/chintan9/plyr-react/pull/322) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 122 | - Bump babel-jest from 26.1.0 to 26.3.0 [\#320](https://github.com/chintan9/plyr-react/pull/320) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 123 | - Bump lodash from 4.17.19 to 4.17.20 [\#319](https://github.com/chintan9/plyr-react/pull/319) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 124 | - Create Dependabot config file [\#318](https://github.com/chintan9/plyr-react/pull/318) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 125 | - Bump jest-watch-typeahead from 0.6.0 to 0.6.1 [\#316](https://github.com/chintan9/plyr-react/pull/316) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 126 | - Ready for V3 [\#314](https://github.com/chintan9/plyr-react/pull/314) ([chintan9](https://github.com/chintan9)) 127 | - Bump @babel/plugin-proposal-optional-chaining from 7.8.3 to 7.11.0 [\#283](https://github.com/chintan9/plyr-react/pull/283) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 128 | - Changes to Plyr and the Build Pipeline [\#281](https://github.com/chintan9/plyr-react/pull/281) ([iwatakeshi](https://github.com/iwatakeshi)) 129 | - V3 ts [\#267](https://github.com/chintan9/plyr-react/pull/267) ([chintan9](https://github.com/chintan9)) 130 | - V3 master to v3-ts [\#264](https://github.com/chintan9/plyr-react/pull/264) ([chintan9](https://github.com/chintan9)) 131 | - V3 ts [\#263](https://github.com/chintan9/plyr-react/pull/263) ([chintan9](https://github.com/chintan9)) 132 | - \[PR\] Convert project to TypeScript [\#262](https://github.com/chintan9/plyr-react/pull/262) ([iwatakeshi](https://github.com/iwatakeshi)) 133 | - Try to move TS by iwatakeshi \#258 [\#260](https://github.com/chintan9/plyr-react/pull/260) ([chintan9](https://github.com/chintan9)) 134 | - Bump @babel/plugin-proposal-object-rest-spread from 7.8.3 to 7.10.4 [\#252](https://github.com/chintan9/plyr-react/pull/252) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 135 | - Bump react-dom from 16.13.0 to 16.13.1 [\#209](https://github.com/chintan9/plyr-react/pull/209) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 136 | - Bump eslint-config-airbnb from 18.0.1 to 18.1.0 [\#206](https://github.com/chintan9/plyr-react/pull/206) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 137 | - Bump @testing-library/jest-dom from 5.1.1 to 5.5.0 [\#205](https://github.com/chintan9/plyr-react/pull/205) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 138 | - Bump style-loader from 1.1.3 to 1.2.1 [\#204](https://github.com/chintan9/plyr-react/pull/204) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 139 | - Bump babel-loader from 8.0.6 to 8.1.0 [\#203](https://github.com/chintan9/plyr-react/pull/203) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 140 | - Bump eslint-plugin-react-hooks from 2.5.0 to 3.0.0 [\#182](https://github.com/chintan9/plyr-react/pull/182) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 141 | - Bump babel-preset-react-app from 9.1.1 to 9.1.2 [\#178](https://github.com/chintan9/plyr-react/pull/178) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 142 | - Bump react from 16.13.0 to 16.13.1 [\#174](https://github.com/chintan9/plyr-react/pull/174) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 143 | - add youtube example [\#169](https://github.com/chintan9/plyr-react/pull/169) ([chintan9](https://github.com/chintan9)) 144 | - Bump @testing-library/dom from 6.15.0 to 7.0.4 [\#168](https://github.com/chintan9/plyr-react/pull/168) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 145 | - Bump qawolf from 0.9.3 to 0.12.0 [\#163](https://github.com/chintan9/plyr-react/pull/163) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 146 | - Bump rollup-plugin-terser from 5.2.0 to 5.3.0 [\#159](https://github.com/chintan9/plyr-react/pull/159) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 147 | - Bump eslint-plugin-react from 7.18.3 to 7.19.0 [\#158](https://github.com/chintan9/plyr-react/pull/158) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 148 | - Bump rollup from 1.32.0 to 1.32.1 [\#156](https://github.com/chintan9/plyr-react/pull/156) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 149 | - Bump rollup-plugin-babel from 4.3.3 to 4.4.0 [\#155](https://github.com/chintan9/plyr-react/pull/155) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 150 | - Bump cross-env from 7.0.1 to 7.0.2 [\#153](https://github.com/chintan9/plyr-react/pull/153) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 151 | - Bump eslint-plugin-jest from 23.8.1 to 23.8.2 [\#152](https://github.com/chintan9/plyr-react/pull/152) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 152 | - Bump @babel/core from 7.8.4 to 7.8.7 [\#151](https://github.com/chintan9/plyr-react/pull/151) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 153 | - Bump @testing-library/dom from 6.12.2 to 6.15.0 [\#150](https://github.com/chintan9/plyr-react/pull/150) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 154 | - Bump @testing-library/react from 9.4.1 to 9.5.0 [\#149](https://github.com/chintan9/plyr-react/pull/149) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 155 | - Bump cross-env from 7.0.0 to 7.0.1 [\#148](https://github.com/chintan9/plyr-react/pull/148) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 156 | - Bump rollup-plugin-postcss from 2.1.1 to 2.2.0 [\#147](https://github.com/chintan9/plyr-react/pull/147) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 157 | - Bump eslint-plugin-jest from 23.8.0 to 23.8.1 [\#146](https://github.com/chintan9/plyr-react/pull/146) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 158 | - Bump webpack from 4.41.6 to 4.42.0 [\#145](https://github.com/chintan9/plyr-react/pull/145) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 159 | - Bump typescript from 3.8.2 to 3.8.3 [\#144](https://github.com/chintan9/plyr-react/pull/144) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 160 | - Bump rollup from 1.31.1 to 1.32.0 [\#143](https://github.com/chintan9/plyr-react/pull/143) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 161 | - Bump react-test-renderer from 16.12.0 to 16.13.0 [\#141](https://github.com/chintan9/plyr-react/pull/141) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 162 | - Bump eslint-plugin-react-hooks from 2.4.0 to 2.5.0 [\#140](https://github.com/chintan9/plyr-react/pull/140) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 163 | - Bump react-dom from 16.12.0 to 16.13.0 [\#139](https://github.com/chintan9/plyr-react/pull/139) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 164 | - Bump react from 16.12.0 to 16.13.0 [\#138](https://github.com/chintan9/plyr-react/pull/138) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 165 | - Bump babel-eslint from 10.0.3 to 10.1.0 [\#137](https://github.com/chintan9/plyr-react/pull/137) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 166 | - Bump qawolf from 0.9.2 to 0.9.3 [\#135](https://github.com/chintan9/plyr-react/pull/135) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 167 | - Bump @svgr/rollup from 5.1.0 to 5.2.0 [\#134](https://github.com/chintan9/plyr-react/pull/134) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 168 | - Bump rollup-plugin-postcss from 2.0.6 to 2.1.1 [\#133](https://github.com/chintan9/plyr-react/pull/133) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 169 | - Bump @testing-library/react from 9.4.0 to 9.4.1 [\#132](https://github.com/chintan9/plyr-react/pull/132) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 170 | - Bump eslint-plugin-jest from 23.7.0 to 23.8.0 [\#131](https://github.com/chintan9/plyr-react/pull/131) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 171 | - Add cross env and fix test [\#129](https://github.com/chintan9/plyr-react/pull/129) ([chintan9](https://github.com/chintan9)) 172 | 173 | ## [v2.2.0](https://github.com/chintan9/plyr-react/tree/v2.2.0) (2020-01-18) 174 | 175 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v2.0.1...v2.2.0) 176 | 177 | **Closed issues:** 178 | 179 | - Update Docs [\#65](https://github.com/chintan9/plyr-react/issues/65) 180 | - Dependabot couldn't find a package.json for this project [\#56](https://github.com/chintan9/plyr-react/issues/56) 181 | 182 | **Merged pull requests:** 183 | 184 | - Restyle Add Gitpod config [\#72](https://github.com/chintan9/plyr-react/pull/72) ([restyled-io[bot]](https://github.com/apps/restyled-io)) 185 | - Add Gitpod config [\#71](https://github.com/chintan9/plyr-react/pull/71) ([chintan9](https://github.com/chintan9)) 186 | - Restyle Update README.md [\#70](https://github.com/chintan9/plyr-react/pull/70) ([restyled-io[bot]](https://github.com/apps/restyled-io)) 187 | - Update README.md [\#69](https://github.com/chintan9/plyr-react/pull/69) ([chintan9](https://github.com/chintan9)) 188 | - Docs [\#67](https://github.com/chintan9/plyr-react/pull/67) ([chintan9](https://github.com/chintan9)) 189 | - Docs [\#66](https://github.com/chintan9/plyr-react/pull/66) ([chintan9](https://github.com/chintan9)) 190 | - Restyle Docs [\#64](https://github.com/chintan9/plyr-react/pull/64) ([restyled-io[bot]](https://github.com/apps/restyled-io)) 191 | - Docs [\#63](https://github.com/chintan9/plyr-react/pull/63) ([chintan9](https://github.com/chintan9)) 192 | - Bump @testing-library/user-event from 7.2.1 to 8.0.3 [\#62](https://github.com/chintan9/plyr-react/pull/62) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 193 | - Bump @rollup/plugin-node-resolve from 6.1.0 to 7.0.0 [\#61](https://github.com/chintan9/plyr-react/pull/61) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 194 | - Bump @testing-library/jest-dom from 4.2.4 to 5.0.0 [\#60](https://github.com/chintan9/plyr-react/pull/60) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 195 | - Bump @svgr/rollup from 4.3.3 to 5.0.1 [\#59](https://github.com/chintan9/plyr-react/pull/59) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) 196 | - Rollup [\#58](https://github.com/chintan9/plyr-react/pull/58) ([chintan9](https://github.com/chintan9)) 197 | 198 | ## [v2.0.1](https://github.com/chintan9/plyr-react/tree/v2.0.1) (2020-01-17) 199 | 200 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/v2.0.0...v2.0.1) 201 | 202 | ## [v2.0.0](https://github.com/chintan9/plyr-react/tree/v2.0.0) (2020-01-16) 203 | 204 | [Full Changelog](https://github.com/chintan9/plyr-react/compare/e15ea3f2b31dfbb052f625527243bb5975431d00...v2.0.0) 205 | 206 | **Merged pull requests:** 207 | 208 | - Bundle with webpack [\#55](https://github.com/chintan9/plyr-react/pull/55) ([chintan9](https://github.com/chintan9)) 209 | - make thing nice [\#53](https://github.com/chintan9/plyr-react/pull/53) ([chintan9](https://github.com/chintan9)) 210 | - update [\#51](https://github.com/chintan9/plyr-react/pull/51) ([chintan9](https://github.com/chintan9)) 211 | - Add Gitpod config [\#47](https://github.com/chintan9/plyr-react/pull/47) ([chintan9](https://github.com/chintan9)) 212 | - Rewrite [\#23](https://github.com/chintan9/plyr-react/pull/23) ([chintan9](https://github.com/chintan9)) 213 | - Rewrite [\#21](https://github.com/chintan9/plyr-react/pull/21) ([chintan9](https://github.com/chintan9)) 214 | - Update dependency rollup to v1.27.10 [\#20](https://github.com/chintan9/plyr-react/pull/20) ([renovate[bot]](https://github.com/apps/renovate)) 215 | - Update dependency rollup-plugin-postcss to v2 [\#18](https://github.com/chintan9/plyr-react/pull/18) ([renovate[bot]](https://github.com/apps/renovate)) 216 | - Update dependency rollup to v1 [\#14](https://github.com/chintan9/plyr-react/pull/14) ([renovate[bot]](https://github.com/apps/renovate)) 217 | - Update dependency gh-pages to v2 [\#12](https://github.com/chintan9/plyr-react/pull/12) ([renovate[bot]](https://github.com/apps/renovate)) 218 | - Update dependency eslint-plugin-standard to v4 [\#11](https://github.com/chintan9/plyr-react/pull/11) ([renovate[bot]](https://github.com/apps/renovate)) 219 | - Update dependency eslint-plugin-node to v10 [\#10](https://github.com/chintan9/plyr-react/pull/10) ([renovate[bot]](https://github.com/apps/renovate)) 220 | - Update dependency eslint-config-standard-react to v9 [\#9](https://github.com/chintan9/plyr-react/pull/9) ([renovate[bot]](https://github.com/apps/renovate)) 221 | - Update dependency eslint-config-standard to v14 [\#8](https://github.com/chintan9/plyr-react/pull/8) ([renovate[bot]](https://github.com/apps/renovate)) 222 | - Update dependency eslint to v6 [\#7](https://github.com/chintan9/plyr-react/pull/7) ([renovate[bot]](https://github.com/apps/renovate)) 223 | - Update dependency cross-env to v6 [\#6](https://github.com/chintan9/plyr-react/pull/6) ([renovate[bot]](https://github.com/apps/renovate)) 224 | - Update dependency babel-eslint to v10 [\#5](https://github.com/chintan9/plyr-react/pull/5) ([renovate[bot]](https://github.com/apps/renovate)) 225 | - Update dependency @svgr/rollup to v4 [\#4](https://github.com/chintan9/plyr-react/pull/4) ([renovate[bot]](https://github.com/apps/renovate)) 226 | - Update dependency rollup to v0.68.2 [\#3](https://github.com/chintan9/plyr-react/pull/3) ([renovate[bot]](https://github.com/apps/renovate)) 227 | - Pin dependencies [\#2](https://github.com/chintan9/plyr-react/pull/2) ([renovate[bot]](https://github.com/apps/renovate)) 228 | - Configure Renovate [\#1](https://github.com/chintan9/plyr-react/pull/1) ([renovate[bot]](https://github.com/apps/renovate)) 229 | 230 | \* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ 231 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and 9 | expression, level of experience, education, socio-economic status, nationality, 10 | personal appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or reject 41 | comments, commits, code, wiki edits, issues, and other contributions that are 42 | not aligned to this Code of Conduct, or to ban temporarily or permanently any 43 | contributor for other behaviors that they deem inappropriate, threatening, 44 | offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at chintan9@aol.in. All complaints will 59 | be reviewed and investigated and will result in a response that is deemed 60 | necessary and appropriate to the circumstances. The project team is obligated to 61 | maintain confidentiality with regard to the reporter of an incident. Further 62 | details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 71 | version 1.4, available at 72 | https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 73 | 74 | [homepage]: https://www.contributor-covenant.org 75 | 76 | For answers to common questions about this code of conduct, see 77 | https://www.contributor-covenant.org/faq 78 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish 4 | to make via issue, email, or any other method with the owners of this repository 5 | before making a change. 6 | 7 | Please note we have a code of conduct, please follow it in all your interactions 8 | with the project. 9 | 10 | ## Pull Request Process 11 | 12 | 1. Ensure any install or build dependencies are removed before the end of the 13 | layer when doing a build. 14 | 2. Update the README.md with details of changes to the interface, this includes 15 | new environment variables, exposed ports, useful file locations and container 16 | parameters. 17 | 3. Increase the version numbers in any examples files and the README.md to the 18 | new version that this Pull Request would represent. The versioning scheme we 19 | use is [SemVer](http://semver.org/). 20 | 4. You may merge the Pull Request in once you have the sign-off of two other 21 | developers, or if you do not have permission to do that, you may request the 22 | second reviewer to merge it for you. 23 | 24 | ## Code of Conduct 25 | 26 | ### Our Pledge 27 | 28 | In the interest of fostering an open and welcoming environment, we as 29 | contributors and maintainers pledge to making participation in our project and 30 | our community a harassment-free experience for everyone, regardless of age, body 31 | size, disability, ethnicity, gender identity and expression, level of 32 | experience, nationality, personal appearance, race, religion, or sexual identity 33 | and orientation. 34 | 35 | ### Our Standards 36 | 37 | Examples of behavior that contributes to creating a positive environment 38 | include: 39 | 40 | - Using welcoming and inclusive language 41 | - Being respectful of differing viewpoints and experiences 42 | - Gracefully accepting constructive criticism 43 | - Focusing on what is best for the community 44 | - Showing empathy towards other community members 45 | 46 | Examples of unacceptable behavior by participants include: 47 | 48 | - The use of sexualized language or imagery and unwelcome sexual attention or 49 | advances 50 | - Trolling, insulting/derogatory comments, and personal or political attacks 51 | - Public or private harassment 52 | - Publishing others' private information, such as a physical or electronic 53 | address, without explicit permission 54 | - Other conduct which could reasonably be considered inappropriate in a 55 | professional setting 56 | 57 | ### Our Responsibilities 58 | 59 | Project maintainers are responsible for clarifying the standards of acceptable 60 | behavior and are expected to take appropriate and fair corrective action in 61 | response to any instances of unacceptable behavior. 62 | 63 | Project maintainers have the right and responsibility to remove, edit, or reject 64 | comments, commits, code, wiki edits, issues, and other contributions that are 65 | not aligned to this Code of Conduct, or to ban temporarily or permanently any 66 | contributor for other behaviors that they deem inappropriate, threatening, 67 | offensive, or harmful. 68 | 69 | ### Scope 70 | 71 | This Code of Conduct applies both within project spaces and in public spaces 72 | when an individual is representing the project or its community. Examples of 73 | representing a project or community include using an official project e-mail 74 | address, posting via an official social media account, or acting as an appointed 75 | representative at an online or offline event. Representation of a project may be 76 | further defined and clarified by project maintainers. 77 | 78 | ### Enforcement 79 | 80 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 81 | reported by contacting the project team at [INSERT EMAIL ADDRESS]. All 82 | complaints will be reviewed and investigated and will result in a response that 83 | is deemed necessary and appropriate to the circumstances. The project team is 84 | obligated to maintain confidentiality with regard to the reporter of an 85 | incident. Further details of specific enforcement policies may be posted 86 | separately. 87 | 88 | Project maintainers who do not follow or enforce the Code of Conduct in good 89 | faith may face temporary or permanent repercussions as determined by other 90 | members of the project's leadership. 91 | 92 | ### Attribution 93 | 94 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 95 | version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 96 | 97 | [homepage]: http://contributor-covenant.org 98 | [version]: http://contributor-covenant.org/version/1/4/ 99 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Chintan Prajapati 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Plyr React

2 |

plyr-react logo

3 | 4 |

5 | A responsive media player that is simple, easy to use, and customizable for video, audio, YouTube, and Vimeo. 6 |
7 | tree-shakeable 8 | side-effect free 9 |

10 | 11 |

12 | 13 | License 14 | 15 | 16 | Version 17 | 18 | 19 | Downloads 20 | 21 |

22 | 23 | You can see a live demo [here](https://githubbox.com/chintan9/plyr-react/tree/master/example/react). 24 | 25 | > Make sure to select the version for the plyr-react in the dependencies. 26 | 27 | ## Installation 28 | 29 | ```bash 30 | # NPM 31 | npm install plyr-react 32 | 33 | # Yarn 34 | yarn add plyr-react 35 | ``` 36 | 37 | ## Usage 38 | 39 | ### Ready to use `` component 40 | 41 | The simplest form of react integration with the plyr is to use the `` component, it is best for the static 42 | videos. 43 | 44 | ```tsx 45 | import Plyr from "plyr-react" 46 | import "plyr-react/plyr.css" 47 | 48 | const plyrProps = { 49 | source: undefined, // https://github.com/sampotts/plyr#the-source-setter 50 | options: undefined, // https://github.com/sampotts/plyr#options 51 | // Direct props for inner video tag (mdn.io/video) 52 | } 53 | 54 | function MyPlyrVideo() { 55 | return 56 | } 57 | ``` 58 | 59 |
60 | Old version 4 plyr-react 61 | - The path for an import of css styles has been changed in version 5, if you are using the version 4, apply following change in the above code 62 | 63 | ```diff 64 | - import "plyr-react/plyr.css" 65 | + import "plyr-react/dist/plyr.css" 66 | ``` 67 | 68 |
69 | 70 | ### Ready to use `usePlyr` hook 71 | 72 | If you need the full control over all if possible integration one can imagine, usePlyr is your hook. Here is a simple 73 | and exact Plyr component made with the `usePlyr` hook. Are curios about how it works follow 74 | this [thread](https://github.com/chintan9/plyr-react/issues/732#issuecomment-1029714462) and 75 | this [proposal](https://github.com/chintan9/plyr-react/issues/678#issue-1043113412). 76 | 77 | ```jsx 78 | const Plyr = React.forwardRef((props, ref) => { 79 | const { source, options = null, ...rest } = props 80 | const raptorRef = usePlyr(ref, { 81 | source, 82 | options, 83 | }) 84 | return