Skip to content

Commit 8e6efb1

Browse files
robwalchtjenkinson
andauthored
Migrate to Rollup with new ESM target and improved Worker support (video-dev#5299)
* Convert build packager to rollup * Add an es module target (video-dev#2910) * UMD build worker injection (video-dev#5107) * Add ES5 syntax check for UMD builds (video-dev#5301, video-dev#5288) * Add common rollup config * handle `self` not existing (happens in nodejs. The check that makes sure the dist file can be required in node and not throw was failing because of this.) * Disable coverage in CI * Add `config.workerPath` option and "hls.worker.js" build output (video-dev#5107) * Include transmuxer-interface id ("main" and "audio") in Web Worker setup and error logs Co-authored-by: Tom Jenkinson <[email protected]>
1 parent e01c889 commit 8e6efb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2679
-4331
lines changed

.escheckrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ecmaVersion": "es5",
3+
"modules": "false",
4+
"files": [
5+
"./dist/**/*.js"
6+
]
7+
}

.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = {
2020
// see https://github.com/standard/eslint-config-standard
2121
// 'prettier' (https://github.com/prettier/eslint-config-prettier) must be last
2222
extends: ['eslint:recommended', 'prettier'],
23-
ignorePatterns: ['/src/demux/webworkify-webpack.js'],
2423
parser: '@typescript-eslint/parser',
2524
parserOptions: {
2625
sourceType: 'module',

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ coverage/
2222
/cloudflare-pages
2323
/api-docs
2424
/api-docs-markdown
25+
/karma-temp
2526

2627
# eslint
2728
.eslintcache

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
/demo/libs
66
/dist
77
/lib
8-
/src/demux/webworkify-webpack.js
98
package-lock.json

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ HLS.js works directly on top of a standard HTML`<video>` element.
1919

2020
HLS.js is written in [ECMAScript6] (`*.js`) and [TypeScript] (`*.ts`) (strongly typed superset of ES6), and transpiled in ECMAScript5 using [Babel](https://babeljs.io/) and the [TypeScript compiler].
2121

22-
[Webpack] is used to build the distro bundle and serve the local development environment.
22+
[Rollup] is used to build the distro bundle and serve the local development environment.
2323

2424
[html5 video]: https://www.html5rocks.com/en/tutorials/video/basics/
2525
[mediasource extensions]: https://w3c.github.io/media-source/
@@ -28,7 +28,7 @@ HLS.js is written in [ECMAScript6] (`*.js`) and [TypeScript] (`*.ts`) (strongly
2828
[ecmascript6]: https://github.com/ericdouglas/ES6-Learning#articles--tutorials
2929
[typescript]: https://www.typescriptlang.org/
3030
[typescript compiler]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
31-
[webpack]: https://webpack.js.org/
31+
[rollup]: https://rollupjs.org/
3232

3333
## Features
3434

@@ -177,7 +177,7 @@ Only debug-mode artifacts:
177177
npm run build:debug
178178
```
179179

180-
Build and watch (customized dev setups where you'll want to host through another server than webpacks' - for example in a sub-module/project)
180+
Build and watch (customized dev setups where you'll want to host through another server - for example in a sub-module/project)
181181

182182
```
183183
npm run build:watch

api-extractor/report/hls.js.api.md

+1
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,7 @@ export interface HlsChunkPerformanceTiming extends HlsPerformanceTiming {
16101610
export type HlsConfig = {
16111611
debug: boolean | ILogger;
16121612
enableWorker: boolean;
1613+
workerPath: null | string;
16131614
enableSoftwareAES: boolean;
16141615
minAutoBitrate: number;
16151616
ignoreDevicePixelRatio: boolean;

0 commit comments

Comments
 (0)