@openplayerjs/hls 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.js +36845 -0
- package/dist/index.js.map +1 -0
- package/dist/openplayer-hls.umd.js +2 -0
- package/dist/openplayer-hls.umd.js.map +1 -0
- package/dist/types/hls.d.ts +23 -0
- package/dist/types/hls.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/umd.d.ts +2 -0
- package/dist/types/umd.d.ts.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IEngine, MediaEngineContext, MediaSource } from '@openplayerjs/core';
|
|
2
|
+
import { BaseMediaEngine } from '@openplayerjs/core';
|
|
3
|
+
import Hls from 'hls.js';
|
|
4
|
+
export declare class HlsMediaEngine extends BaseMediaEngine implements IEngine {
|
|
5
|
+
private config;
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
capabilities: string[];
|
|
9
|
+
priority: number;
|
|
10
|
+
private adapter;
|
|
11
|
+
private attemptedErrorRecovery;
|
|
12
|
+
private recoverSwapAudioCodecDate;
|
|
13
|
+
private startedLoad;
|
|
14
|
+
private adapterListeners;
|
|
15
|
+
constructor(config?: any);
|
|
16
|
+
getAdapter<T = Hls>(): T | undefined;
|
|
17
|
+
canPlay(source: MediaSource): boolean;
|
|
18
|
+
attach(ctx: MediaEngineContext): void;
|
|
19
|
+
detach(): void;
|
|
20
|
+
private onAdapterEvent;
|
|
21
|
+
private unbindAdapterEvents;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=hls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hls.d.ts","sourceRoot":"","sources":["../../src/hls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAiB,MAAM,oBAAoB,CAAC;AACpE,OAAO,GAAG,MAAM,QAAQ,CAAC;AAQzB,qBAAa,cAAe,SAAQ,eAAgB,YAAW,OAAO;IAYxD,OAAO,CAAC,MAAM;IAX1B,IAAI,SAAgB;IACpB,OAAO,SAAW;IAClB,YAAY,WAAoB;IAChC,QAAQ,SAAM;IAEd,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,sBAAsB,CAAuB;IACrD,OAAO,CAAC,yBAAyB,CAAuB;IACxD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,gBAAgB,CAAyB;gBAE7B,MAAM,GAAE,GAAQ;IAIpC,UAAU,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,SAAS;IAIpC,OAAO,CAAC,MAAM,EAAE,WAAW;IAW3B,MAAM,CAAC,GAAG,EAAE,kBAAkB;IAgJ9B,MAAM;IAUN,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;CAW5B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @openplayerjs/hls
|
|
3
|
+
*
|
|
4
|
+
* HLS streaming engine for OpenPlayerJS, powered by hls.js.
|
|
5
|
+
* Peer dependency: @openplayerjs/core, hls.js >=1.0
|
|
6
|
+
*
|
|
7
|
+
* ESM usage:
|
|
8
|
+
* import { HlsMediaEngine } from '@openplayerjs/hls';
|
|
9
|
+
* new Core(el, { plugins: [new HlsMediaEngine()] });
|
|
10
|
+
*
|
|
11
|
+
* UMD / CDN usage: load openplayer-hls.umd.js after the main OpenPlayer bundle.
|
|
12
|
+
* It auto-registers itself under window.OpenPlayerPlugins.hls.
|
|
13
|
+
*/
|
|
14
|
+
export { HlsMediaEngine } from './hls';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"umd.d.ts","sourceRoot":"","sources":["../../src/umd.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openplayerjs/hls",
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
|
+
"description": "HLS streaming engine for OpenPlayerJS, powered by hls.js",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Rafael Miranda",
|
|
7
|
+
"email": "rafa8626@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"types": "./dist/types/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/openplayerjs/openplayerjs.git",
|
|
27
|
+
"directory": "packages/hls"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"hls",
|
|
31
|
+
"streaming",
|
|
32
|
+
"player",
|
|
33
|
+
"openplayer",
|
|
34
|
+
"hls.js"
|
|
35
|
+
],
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"hls.js": ">=1.0.0",
|
|
38
|
+
"@openplayerjs/core": "^3.0.0-beta.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "jest --passWithNoTests --config ../../jest.config.cjs"
|
|
45
|
+
}
|
|
46
|
+
}
|