Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/v1.4.1 doris #80

Merged
merged 85 commits into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
0d7db5b
reference v1 jsdelivr url in v1 api doc
tjenkinson Apr 12, 2023
aacecab
chore(deps): update dependency @rollup/plugin-alias to v4.0.4
renovate[bot] Apr 12, 2023
df4f46a
Merge pull request #5382 from video-dev/renovate/rollup-plugin-alias-4.x
hlsjs-ci Apr 12, 2023
be37eb8
chore(deps): update dependency @microsoft/api-documenter to v7.21.7
renovate[bot] Apr 12, 2023
cde8f56
Merge pull request #5386 from video-dev/renovate/microsoft-api-docume…
hlsjs-ci Apr 12, 2023
80070b4
chore(deps): update dependency @rollup/plugin-typescript to v11.1.0
renovate[bot] Apr 12, 2023
83d0c6f
Merge pull request #5384 from video-dev/renovate/rollup-plugin-typesc…
hlsjs-ci Apr 12, 2023
abad27c
chore(deps): update dependency @rollup/plugin-node-resolve to v15.0.2
renovate[bot] Apr 12, 2023
b1ba59c
Merge pull request #5383 from video-dev/renovate/rollup-plugin-node-r…
hlsjs-ci Apr 12, 2023
3bd4336
chore(deps): update dependency wrangler to v2.15.0
renovate[bot] Apr 12, 2023
c7ce6b6
Merge pull request #5388 from video-dev/renovate/wrangler-2.x
hlsjs-ci Apr 12, 2023
eb6c74f
chore(deps): update dependency @rollup/plugin-alias to v5
renovate[bot] Apr 12, 2023
c176f5a
Merge pull request #5385 from video-dev/renovate/rollup-plugin-alias-5.x
tjenkinson Apr 12, 2023
8c528d3
Fix readme logos & add Mux logo (#5390)
luwes Apr 12, 2023
c6ef93a
chore(deps): update dependency lint-staged to v13.2.1
renovate[bot] Apr 14, 2023
b0e88cf
Merge pull request #5394 from video-dev/renovate/lint-staged-13.x
hlsjs-ci Apr 14, 2023
9432d5f
chore(deps): update dependency typescript to v5.0.4
renovate[bot] Apr 14, 2023
e2cd057
Merge pull request #5395 from video-dev/renovate/typescript-5.x
hlsjs-ci Apr 15, 2023
7b39d16
chore(deps): update dependency eslint to v8.38.0
renovate[bot] Apr 15, 2023
54707a9
Merge pull request #5396 from video-dev/renovate/eslint-8.x
hlsjs-ci Apr 15, 2023
baf16ed
chore(deps): update dependency es-check to v7.1.1
renovate[bot] Apr 16, 2023
9501245
Merge pull request #5397 from video-dev/renovate/es-check-7.x
hlsjs-ci Apr 16, 2023
7773229
chore(deps): update dependency @rollup/plugin-terser to v0.4.1
renovate[bot] Apr 16, 2023
7782205
Merge pull request #5398 from video-dev/renovate/rollup-plugin-terser…
hlsjs-ci Apr 17, 2023
c4aa95f
chore(deps): update typescript-eslint monorepo to v5.58.0
renovate[bot] Apr 17, 2023
b2e4460
Merge pull request #5399 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci Apr 17, 2023
507a316
chore(deps): update dependency semver to v7.4.0
renovate[bot] Apr 17, 2023
3dc48f5
Merge pull request #5400 from video-dev/renovate/semver-7.x
hlsjs-ci Apr 18, 2023
6f7deea
chore(deps): update dependency @rollup/plugin-commonjs to v24.1.0
renovate[bot] Apr 18, 2023
4aecfeb
Merge pull request #5401 from video-dev/renovate/rollup-plugin-common…
hlsjs-ci Apr 19, 2023
4398ba2
chore(deps): update dependency semver to v7.5.0
renovate[bot] Apr 19, 2023
e5eca3d
Merge pull request #5404 from video-dev/renovate/semver-7.x
hlsjs-ci Apr 20, 2023
17a8737
chore(deps): update typescript-eslint monorepo to v5.59.0
renovate[bot] Apr 20, 2023
ebd7993
Merge pull request #5405 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci Apr 20, 2023
a9afcd5
Setup npm provenance statements (#5406)
tjenkinson Apr 20, 2023
ca60d2c
chore(deps): update dependency chromedriver to v112 (#5393)
renovate[bot] Apr 20, 2023
f5c74a4
set `internalChecksAsSuccess` renovate option
tjenkinson Apr 21, 2023
c0a0063
chore(deps): update dependency wrangler to v2.15.1
renovate[bot] Apr 21, 2023
70dbfbe
Merge pull request #5408 from video-dev/renovate/wrangler-2.x
hlsjs-ci Apr 21, 2023
3982190
set renovate `prNotPendingHours` to 0
tjenkinson Apr 21, 2023
be549a8
chore(deps): update dependency wrangler to v2.16.0
renovate[bot] Apr 21, 2023
e741ee3
Merge pull request #5411 from video-dev/renovate/wrangler-2.x
hlsjs-ci Apr 22, 2023
7f98e45
chore(deps): update dependency rollup to v3.20.3
renovate[bot] Apr 23, 2023
21cb856
Merge pull request #5414 from video-dev/renovate/rollup-3.x
hlsjs-ci Apr 23, 2023
8fbdae6
chore(deps): update dependency rollup to v3.20.7
renovate[bot] Apr 23, 2023
48a0e97
Merge pull request #5415 from video-dev/renovate/rollup-3.x
hlsjs-ci Apr 23, 2023
b774318
chore(deps): update dependency rollup to v3.21.0
renovate[bot] Apr 23, 2023
666780e
Merge pull request #5416 from video-dev/renovate/rollup-3.x
hlsjs-ci Apr 24, 2023
0e14626
chore(deps): update tjenkinson/gh-action-auto-merge-dependency-update…
renovate[bot] Apr 24, 2023
569054a
tweak renovate options again
tjenkinson Apr 24, 2023
0b1e939
reset remainderData in resetContiguity (#5410)
WilliamChiu Apr 24, 2023
7802cfc
docs: add Media Chrome for custom UI (#5391)
luwes Apr 26, 2023
77ced53
Perform playlist retries before redundant failover and level switch (…
robwalch Apr 26, 2023
0fb288d
chore(deps): update dependency sinon to v15.0.4
renovate[bot] Apr 27, 2023
badbaa1
Merge pull request #5427 from video-dev/renovate/sinon-15.x
hlsjs-ci Apr 27, 2023
1181cfa
chore(deps): update dependency karma-chrome-launcher to v3.2.0
renovate[bot] Apr 27, 2023
07cca66
Merge pull request #5428 from video-dev/renovate/karma-chrome-launche…
hlsjs-ci Apr 27, 2023
c8e95b6
chore(deps): update dependency selenium-webdriver to v4.9.0
renovate[bot] Apr 28, 2023
163442d
Merge pull request #5429 from video-dev/renovate/selenium-webdriver-4.x
hlsjs-ci Apr 28, 2023
8d142ec
Update audio-track-controller.ts (#5431)
agajassi Apr 28, 2023
3c615c1
chore(deps): update dependency eslint to v8.39.0
renovate[bot] Apr 28, 2023
2d26c77
Merge pull request #5434 from video-dev/renovate/eslint-8.x
hlsjs-ci Apr 28, 2023
ef60b22
chore(deps): update dependency karma to v6.4.2
renovate[bot] Apr 28, 2023
2c2e0e9
Merge pull request #5435 from video-dev/renovate/karma-6.x
hlsjs-ci Apr 29, 2023
10b5f73
chore(deps): update dependency prettier to v2.8.8
renovate[bot] Apr 30, 2023
69e9c1d
Merge pull request #5437 from video-dev/renovate/prettier-2.x
hlsjs-ci Apr 30, 2023
1dd74bb
Fix incorrect HEVC main profile codec id (#5438)
StaZhu May 1, 2023
9082342
fix: move `types` condition to the front (#5439)
Andarist May 1, 2023
1c30a1f
chore(deps): update dependency wrangler to v2.17.0
renovate[bot] May 1, 2023
d7c4ec9
Merge pull request #5441 from video-dev/renovate/wrangler-2.x
hlsjs-ci May 1, 2023
b26542f
chore(deps): update typescript-eslint monorepo to v5.59.1
renovate[bot] May 1, 2023
e70c3aa
Merge pull request #5442 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci May 1, 2023
31b0b04
chore(deps): update typescript-eslint monorepo to v5.59.2
renovate[bot] May 1, 2023
89ca104
Merge pull request #5443 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci May 1, 2023
f4629d3
Fix Low-Latency part and fragment tracking (#5423)
robwalch May 3, 2023
4c5bc20
chore(deps): update dependency lint-staged to v13.2.2
renovate[bot] May 3, 2023
4aec275
Merge pull request #5449 from video-dev/renovate/lint-staged-13.x
hlsjs-ci May 3, 2023
2105ade
Always use MediaSource returned by utils module (#5448)
robwalch May 3, 2023
d18b676
chore(deps): update dependency @microsoft/api-documenter to v7.22.0
renovate[bot] May 4, 2023
bb5072e
Merge pull request #5453 from video-dev/renovate/microsoft-api-docume…
hlsjs-ci May 4, 2023
36bc6b9
chore(deps): update dependency @microsoft/api-documenter to v7.22.4
renovate[bot] May 4, 2023
b0a72ff
Merge pull request #5454 from video-dev/renovate/microsoft-api-docume…
hlsjs-ci May 4, 2023
ed92502
Merge branch 'patch/v1.4.x-doris' into patch/v1.4.1-doris
yajin2021 May 5, 2023
4a041f8
chore: Modify version
yajin2021 May 6, 2023
4b82931
chore: remove package-lock.json
yajin2021 May 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@b2d85843a11a4075ea396c995a677a5ca1ba5c19
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@01b22a97735b01be6bc1d8a2705f7ee167472414
with:
repo-token: ${{ secrets.CI_GITHUB_TOKEN }}
allowed-actors: renovate[bot]
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ jobs:
needs: [config, test_unit]
if: needs.config.outputs.tag || needs.config.outputs.isMainBranch == 'true'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3

Expand Down
28 changes: 16 additions & 12 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ export class BaseStreamController extends TaskLoop implements NetworkComponentAP
// (undocumented)
protected fragPrevious: Fragment | null;
// (undocumented)
protected getAppendedFrag(position: number, playlistType?: PlaylistLevelType): Fragment | null;
// (undocumented)
protected getCurrentContext(chunkMeta: ChunkMetadata): {
frag: Fragment;
part: Part | null;
Expand Down
10 changes: 5 additions & 5 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ See [API Reference](https://hlsjs-dev.video-dev.org/api-docs/) for a complete li

### First step: setup and support

First include `https://cdn.jsdelivr.net/npm/hls.js@latest` (or `/hls.js` for unminified) in your web page.
First include `https://cdn.jsdelivr.net/npm/hls.js@1` (or `/hls.js` for unminified) in your web page.

```html
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="//cdn.jsdelivr.net/npm/hls.js@1"></script>
```

Invoke the following static method: `Hls.isSupported()` to check whether your browser is supporting [MediaSource Extensions](http://w3c.github.io/media-source/).

```html
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
<script>
if (Hls.isSupported()) {
console.log('hello hls.js!');
Expand All @@ -200,7 +200,7 @@ Let's
- bind video element to this HLS object

```html
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>

<video id="video"></video>
<script>
Expand All @@ -222,7 +222,7 @@ Let's
You need to provide manifest URL as below:

```html
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>

<video id="video"></video>
<script>
Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hls.js",
"version": "1.4.1",
"version": "1.4.2",
"license": "Apache-2.0",
"description": "JavaScript HLS client using MediaSourceExtension",
"homepage": "https://github.com/video-dev/hls.js",
Expand All @@ -17,9 +17,9 @@
"types": "./dist/hls.js.d.ts",
"exports": {
".": {
"types": "./dist/hls.js.d.ts",
"import": "./dist/hls.mjs",
"require": "./dist/hls.js",
"types": "./dist/hls.js.d.ts"
"require": "./dist/hls.js"
},
"./dist/*": "./dist/*",
"./package.json": "./package.json"
Expand Down Expand Up @@ -71,29 +71,29 @@
"@babel/preset-env": "7.21.4",
"@babel/preset-typescript": "7.21.4",
"@babel/register": "7.21.0",
"@microsoft/api-documenter": "7.21.6",
"@microsoft/api-documenter": "7.22.4",
"@microsoft/api-extractor": "7.34.4",
"@rollup/plugin-alias": "4.0.3",
"@rollup/plugin-alias": "5.0.0",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-commonjs": "24.0.1",
"@rollup/plugin-node-resolve": "15.0.1",
"@rollup/plugin-commonjs": "24.1.0",
"@rollup/plugin-node-resolve": "15.0.2",
"@rollup/plugin-replace": "5.0.2",
"@rollup/plugin-terser": "0.4.0",
"@rollup/plugin-typescript": "11.0.0",
"@rollup/plugin-terser": "0.4.1",
"@rollup/plugin-typescript": "11.1.0",
"@types/chai": "4.3.4",
"@types/chart.js": "2.9.37",
"@types/mocha": "10.0.1",
"@types/sinon-chai": "3.2.9",
"@typescript-eslint/eslint-plugin": "5.57.1",
"@typescript-eslint/parser": "5.57.1",
"@typescript-eslint/eslint-plugin": "5.59.2",
"@typescript-eslint/parser": "5.59.2",
"babel-loader": "9.1.2",
"babel-plugin-transform-remove-console": "6.9.4",
"chai": "4.3.7",
"chart.js": "2.9.4",
"chromedriver": "111.0.0",
"chromedriver": "112.0.0",
"doctoc": "2.2.1",
"es-check": "7.1.0",
"eslint": "8.37.0",
"es-check": "7.1.1",
"eslint": "8.39.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-mocha": "10.1.0",
Expand All @@ -103,31 +103,31 @@
"http-server": "14.1.1",
"husky": "8.0.3",
"jsonpack": "1.1.5",
"karma": "6.4.1",
"karma-chrome-launcher": "3.1.1",
"karma": "6.4.2",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.0",
"karma-mocha": "2.0.1",
"karma-mocha-reporter": "2.2.5",
"karma-rollup-preprocessor": "7.0.8",
"karma-sinon-chai": "2.0.2",
"karma-sourcemap-loader": "0.4.0",
"lint-staged": "13.2.0",
"lint-staged": "13.2.2",
"markdown-styles": "3.2.0",
"micromatch": "4.0.5",
"mocha": "10.2.0",
"node-fetch": "3.3.1",
"npm-run-all": "4.1.5",
"prettier": "2.8.7",
"prettier": "2.8.8",
"promise-polyfill": "8.3.0",
"rollup": "3.20.2",
"rollup": "3.21.0",
"rollup-plugin-istanbul": "4.0.0",
"sauce-connect-launcher": "1.3.2",
"selenium-webdriver": "4.8.2",
"semver": "7.3.8",
"sinon": "15.0.3",
"selenium-webdriver": "4.9.0",
"semver": "7.5.0",
"sinon": "15.0.4",
"sinon-chai": "3.7.0",
"typescript": "5.0.3",
"typescript": "5.0.4",
"url-toolkit": "2.2.5",
"wrangler": "2.14.0"
"wrangler": "2.17.0"
}
}
5 changes: 3 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"labels": ["dependencies", "skip-change-log"],
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
"prCreation": "not-pending",
"stabilityDays": 7,
"prCreation": "immediate",
"minimumReleaseAge": "7 days",
"internalChecksFilter": "strict",
"vulnerabilityAlerts": {
"addLabels": ["security"]
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $(node ./scripts/check-already-published.js) = "not published" ]]; then
# see https://docs.npmjs.com/private-modules/ci-server-config
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
if [[ -z "$TAG" ]]; then
npm publish --tag canary
npm publish --provenance --tag canary
echo "Published canary."
curl https://purge.jsdelivr.net/npm/hls.js@canary
curl https://purge.jsdelivr.net/npm/hls.js@canary/dist/hls-demo.js
Expand All @@ -19,7 +19,7 @@ if [[ $(node ./scripts/check-already-published.js) = "not published" ]]; then
exit 1
fi
echo "Publishing tag: ${tag}"
npm publish --tag "${tag}"
npm publish --provenance --tag "${tag}"
curl "https://purge.jsdelivr.net/npm/hls.js@${tag}"
echo "Published."
fi
Expand Down
28 changes: 18 additions & 10 deletions src/controller/audio-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,7 @@ class AudioStreamController
(!mainBufferInfo?.len && bufferInfo.len)
) {
// Check fragment-tracker for main fragments since GAP segments do not show up in bufferInfo
const mainFrag = this.fragmentTracker.getBufferedFrag(
frag.start,
PlaylistLevelType.MAIN
);
const mainFrag = this.getAppendedFrag(frag.start, PlaylistLevelType.MAIN);
if (mainFrag === null) {
return;
}
Expand Down Expand Up @@ -472,12 +469,18 @@ class AudioStreamController
}

onManifestLoading() {
this.mainDetails = null;
this.fragmentTracker.removeAllFragments();
this.startPosition = this.lastCurrentTime = 0;
this.bufferFlushed = false;
this.bufferedTrack = null;
this.switchingTrack = null;
this.levels =
this.mainDetails =
this.waitingData =
this.bufferedTrack =
this.cachedTrackLoadedData =
this.switchingTrack =
null;
this.startFragRequested = false;
this.trackId = this.videoTrackCC = this.waitingVideoCC = -1;
}

onLevelLoaded(event: Events.LEVEL_LOADED, data: LevelLoadedData) {
Expand All @@ -500,7 +503,11 @@ class AudioStreamController
return;
}
this.log(
`Track ${trackId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${newDetails.totalduration}`
`Track ${trackId} loaded [${newDetails.startSN},${newDetails.endSN}]${
newDetails.lastPartSn
? `[part-${newDetails.lastPartSn}-${newDetails.lastPartIndex}]`
: ''
},duration:${newDetails.totalduration}`
);

const track = levels[trackId];
Expand Down Expand Up @@ -768,9 +775,10 @@ class AudioStreamController
}

if (initSegment?.tracks) {
this._bufferInitSegment(initSegment.tracks, frag, chunkMeta);
const mapFragment = frag.initSegment || frag;
this._bufferInitSegment(initSegment.tracks, mapFragment, chunkMeta);
hls.trigger(Events.FRAG_PARSING_INIT_SEGMENT, {
frag,
frag: mapFragment,
id,
tracks: initSegment.tracks,
});
Expand Down
5 changes: 3 additions & 2 deletions src/controller/audio-track-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ class AudioTrackController extends BasePlaylistController {
if (!this.selectDefaultTrack || track.default) {
if (
!currentTrack ||
currentTrack.attrs['STABLE-RENDITION-ID'] ===
track.attrs['STABLE-RENDITION-ID']
(currentTrack.attrs['STABLE-RENDITION-ID'] !== undefined &&
currentTrack.attrs['STABLE-RENDITION-ID'] ===
track.attrs['STABLE-RENDITION-ID'])
) {
return track.id;
}
Expand Down
6 changes: 4 additions & 2 deletions src/controller/base-playlist-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ export default class BasePlaylistController implements NetworkComponentAPI {
const errorAction = errorEvent.errorAction;
const { action, retryCount = 0, retryConfig } = errorAction || {};
const retry =
action === NetworkErrorAction.RetryRequest &&
!!errorAction &&
!!retryConfig;
!!retryConfig &&
(action === NetworkErrorAction.RetryRequest ||
(!errorAction.resolved &&
action === NetworkErrorAction.SendAlternateToPenaltyBox));
if (retry) {
this.requestScheduled = -1;
if (isTimeout && errorEvent.context?.deliveryDirectives) {
Expand Down
Loading