Skip to content

Commit

Permalink
Merge pull request #1 from neneka/hlsjs-b24-fork
Browse files Browse the repository at this point in the history
hls.js@fcad45b に追従
  • Loading branch information
xqq authored Feb 6, 2021
2 parents bf13b1a + a3e8fe1 commit b770fc3
Show file tree
Hide file tree
Showing 274 changed files with 61,126 additions and 39,771 deletions.
14 changes: 12 additions & 2 deletions .esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
"source": "./src",
"destination": "./api-docs",
"plugins": [
{"name": "esdoc-standard-plugin"},
{"name": "esdoc-typescript-plugin", "option": {"enable": true}}
{ "name": "@itsjamie/esdoc-standard-plugin" },
{
"name": "@itsjamie/esdoc-typescript-plugin",
"option": { "enable": true }
},
{
"name": "@itsjamie/esdoc-ecmascript-proposal-plugin",
"option": {
"objectRestSpread": true,
"optionalChaining": true
}
}
]
}
155 changes: 75 additions & 80 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,99 +1,94 @@
module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es6': true
env: {
browser: true,
commonjs: true,
es6: true,
},
'globals': {
globals: {
// Allowed globals
'console': true,
console: true,

// Compile-time defines
'__VERSION__': true,
'__USE_SUBTITLES__': true,
'__USE_ALT_AUDIO__': true,
'__USE_EME_DRM__': true
__VERSION__: true,
__USE_SUBTITLES__: true,
__USE_ALT_AUDIO__: true,
__USE_EME_DRM__: true,
},
// see https://standardjs.com/
// see https://github.com/standard/eslint-config-standard
'extends': [
'eslint:recommended',
'standard'
],
'parser': 'typescript-eslint-parser',
'plugins': [
'typescript'
],
'parserOptions': {
'sourceType': 'module'
// 'prettier' (https://github.com/prettier/eslint-config-prettier) must be last
extends: ['eslint:recommended', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
'rules': {
// our basic style rules
'semi': [
'error',
'always'
],
'indent': [
'error',
2
],
'quotes': [
'error',
'single'
],
'linebreak-style': [
'error',
'unix'
],
// spacing
'space-infix-ops': 2,
'space-unary-ops': [2, { 'words': true, 'nonwords': false }],
'space-in-parens': ['error', 'never'],
'keyword-spacing': [2, { 'before': true, 'after': true }],
// enforce litteral objects on multiple lines
'block-spacing': 'error',
'curly': 2,
'object-curly-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { 'allowSingleLine': false }],

// limit code block and line length
/*
"max-len": 1,
"max-statements": 1,
"max-depth": 1,
"max-nested-callbacks": 1,
"max-params": 1,
"max-statements": 1,
"max-statements-per-line": 1
*/

// loosening of code-quality rules we may want to fix later
// (warnings for now)

// forbid "one var" style, enforce one declaration per variable
'one-var': [
1,
'never'
plugins: ['@typescript-eslint', 'import'],
rules: {
'no-restricted-globals': [
2,
{
name: 'window',
message:
'Use `self` instead of `window` to access the global context everywhere (including workers).',
},
{
name: 'SourceBuffer',
message: 'Use `self.SourceBuffer`',
},
{
name: 'setTimeout',
message: 'Use `self.setTimeout`',
},
{
name: 'setInterval',
message: 'Use `self.setInterval`',
},
],

'no-restricted-properties': [2,
{ 'property': 'findIndex' }, // Intended to block usage of Array.prototype.findIndex
{ 'property': 'find' } // Intended to block usage of Array.prototype.find
'no-restricted-properties': [
2,
{ property: 'findIndex' }, // Intended to block usage of Array.prototype.findIndex
{ property: 'find' }, // Intended to block usage of Array.prototype.find
],

'standard/no-callback-literal': 1,
'import/first': 1,
'no-var': 1,
'no-empty': 1,
'no-mixed-operators': 1,
'no-unused-vars': 1,
'no-console': 1,
'no-unused-vars': 'warn',
'no-console': [
1,
{
allow: ['assert'],
},
],
'no-fallthrough': 1,
'no-case-declarations': 1,
'no-irregular-whitespace': 1,
'no-case-declarations': 2,
'no-self-assign': 1,
'new-cap': 1,
'no-undefined': 1,
'no-global-assign': 2
}
'no-undefined': 0,
'no-global-assign': 2,
'prefer-const': 2,
'dot-notation': 2,
'no-void': 2,
'no-useless-catch': 2,
'no-prototype-builtins': 0,
},
overrides: [
{
files: ['*.ts'],
rules: {
'no-unused-vars': 0,
'no-undef': 0,
'no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/prefer-optional-chain': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never',
},
],
},
},
],
};
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

#### **Did you find a bug?**

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/video-dev/hls.js/issues).
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/video-dev/hls.js/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/video-dev/hls.js/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/video-dev/hls.js/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

#### **Did you write a patch that fixes a bug?**

- First, checkout the repository and install required dependencies
- First, checkout the repository and install required dependencies

```sh
git clone https://github.com/video-dev/hls.js.git
Expand All @@ -25,7 +25,7 @@ npm run lint
npm run test
```

- Use [EditorConfig](http://editorconfig.org/) or at least stay consistent to the file formats defined in the `.editorconfig` file.
- Develop in a topic branch, not master
- Use [EditorConfig](http://editorconfig.org/) or at least stay consistent to the file formats defined in the `.editorconfig` file.
- Develop in a topic branch, not master

Thanks! :heart: :heart: :heart:
Thanks! :heart: :heart: :heart:
16 changes: 11 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
---
name: Bug report
about: Create a report to help us improve

---

### What version of Hls.js are you using?

### What browser and OS are you using?

### Test stream:

<!-- If possible, please provide a test stream or page -->
<!-- You can paste your stream into the demo and provide the permalink here -->

### Checklist

<!-- Replace [ ] with [x] to check off the list -->

- [ ] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
- [ ] The issue occurs in the stable client on https://hls-js.netlify.com/demo and not just on my page
<!-- The stable client is built from the latest release -->
- [ ] The issue occurs in the latest client on https://hls-js-latest.netlify.com/demo and not just on my page
- [ ] The issue occurs in the latest client on https://hls-js-dev.netlify.com/demo and not just on my page
<!-- The latest client is built from the head of the master branch -->
- [ ] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [ ] There are no network errors such as 404s in the browser console when trying to play the stream

### Steps to reproduce

1. Please provide clear steps to reproduce your problem
2. If the bug is intermittent, give a rough frequency

### Expected behavior
*What you expected to happen*

_What you expected to happen_

### Actual behavior
*What actually happened*

_What actually happened_

### Console output

```
Paste the contents of the browser console here.
```

```
For media errors reported on Chrome browser, please also paste the output of chrome://media-internals
For media errors reported on Chrome browser, please also paste the output of chrome://media-internals
```
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/question-.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 'Question '
about: Need some help?

---

**What do you want to do with Hls.js?**
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
commit-message:
# prevent netlify build
prefix: '[skip ci]'
open-pull-requests-limit: 99
versioning-strategy: increase-if-necessary
31 changes: 25 additions & 6 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
daysUntilStale: 21

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
daysUntilClose: 3

# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- Confirmed
- Chore
- Enhancement
- Feature proposal
- Question
- Needs Triage

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true

# Set to true to ignore issues with an assignee (defaults to false)
# exemptAssignees: true

# Label to use when marking an issue as stale
staleLabel: Stale

# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
recent activity. It will be closed if no further activity occurs.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
closeComment: >
This issue has been automatically closed because it has not had
recent activity. If this issue is still valid, please ping a maintainer and
ask them to label it accordingly.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 3
28 changes: 28 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto Merge Dependency Updates

on:
- pull_request

jobs:
config:
runs-on: ubuntu-latest
outputs:
hasSecret: ${{ steps.check_secret_access.outputs.result == 'true' }}
steps:
- name: check secret access
id: check_secret_access
run: |
if ! [[ -z "$SECRET" ]]; then
echo "::set-output name=result::true"
fi
env:
SECRET: ${{ secrets.CI_GITHUB_TOKEN }}
run:
needs: config
if: needs.config.outputs.hasSecret == 'true'
runs-on: ubuntu-latest
steps:
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@1ff3f19509b1965cf1753c294c55e8cdb0528178
with:
repo-token: ${{ secrets.CI_GITHUB_TOKEN }}
allowed-actors: dependabot[bot]
Loading

0 comments on commit b770fc3

Please sign in to comment.